All IT and Non IT Interview Questions, MCQs, Online Quiz Questions, Engineering VIVA Questions
Sunday, 15 April 2012
Write a note about the virtual member function. | C++
A virtual function is a member function of the base class and relies on a specific object to determine which implementation of the function is called. However, a virtual function can be declared a friend of another class. If a function is declared virtual in a base class, you can still access it directly using the :: operator. Note that if you do not override a virtual member function in a derived class, a call to that function uses the function implementation defined in the base class.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment