3 ms·
Well, to follow your line - virtual functions can also be implemented with some function pointer stuff within C. We're not discussing implementing various C++ s
by zura 12y ago
Well, to follow your line - virtual functions can also be implemented with some function pointer stuff within C. We're not discussing implementing various C++ stuff in C, we're talking about C++ itself.
- throwawayaway 12y agobe that as it may, it requires more keystrokes to implement virtual functions in C than it does in C++. however, it requires less keystrokes to implement private data in C, than it does to create a class to store private data. therefore it's questionable, if you are preferring non member non friend functions, whether you should use classes when you want private data. i refute the idea that private data is a reason to use classes, if you are preferring non member non friend functions as advocated by Stroustrup, Meyers and Stepanov. as i said already > There's very little reason for class members unless you want inheritance or polymorphism.