All IT and Non IT Interview Questions, MCQs, Online Quiz Questions, Engineering VIVA Questions
Tuesday, 17 April 2012
Write about the members that a derived class can add. | C++
Derived classes can use the constructors, destructors, and assignment operator methods of their base classes. It can also override the member functions of the base class. For example, if the base class has an assignment operator method, the compiler uses that method for the derived class as well, which is fine unless the derived class also adds its own data members (in which case, you should create a new operator = method for the derived class).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment