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

Virtual function

P: 1
When I'll fell that I must declare a virtual function?
Mar 10 '07 #1
Share this Question
Share on Google+
3 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
When I'll fell that I must declare a virtual function?
I'm sorry? I don't understand your question, could you please restate and expand your question?
Mar 10 '07 #2

10K+
P: 13,264
Changed thread title.
Mar 10 '07 #3

P: 1
Hi,

When derived class overrides the base class method by
redefining the same function, then if client wants to
access redefined the method from derived class through a
pointer from base class object, then you must define this
function in base class as virtual function.

bye
ravi
Feb 14 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.