By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

virtual for all derived class

P: n/a
If I define a virtual method in a class, the same method in all
derived classes, no matter it is labeled by "virtual" or not in the
derived class, will be virtual, right?
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Quick Function" <qu******@yahoo.com> wrote in message
news:21**************************@posting.google.c om...
If I define a virtual method in a class, the same method in all
derived classes, no matter it is labeled by "virtual" or not in the
derived class, will be virtual, right?


Correct.

But, I'd label them as virtual in any case, so that later, you (or someone
else) doesn't have to go searching through the hierarchy to *see* if a
function if virtual or not.

-Howard
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.