From: "William Xue"
Yes, it's a good explanation. Thanks a lot.
For the reason I mentioned above, I perfer to do the job like this: ---8<--------------------------------------------->8--- #ifdef cplusplus class ... { ... int foo(...) = 0; ... }; #else class ... { ... int foo(...); ... }; #endif ---8<--------------------------------------------->8---
The problem with doing it this way is that you're repeating yourself. What happens when you need to add a method? Did you remember to add it to both sections? When a signature changes, did you change it in both sections? I don't think it is or should be a primary design goal of programming in any language to make things easy for beginners. There are all sorts of more important goals that come first. - James Jones Administrative Data Mgmt. Webmaster 375 Raritan Center Pkwy, Suite A Data Architect Edison, NJ 08837