Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Modify Your Base Class Interface in Derived Classes

Though the base class exists to save you work, its little quirks can be tricky. What if you need to extend or alter its interface in a derived class? Or readjust a member's access? Learn how to use a using-declaration to control a member's access type and to overload member functions across a class hierarchy.


advertisement
base class provides an interface that is inherited by derived classes. However, in some cases you need to extend, or even alter, the base class's interface in a derived class. For example, if you're overloading a member function of the base class in a derived class or readjusting a member's access.


How do you overload a member function across a class hierarchy? How do you override the access type of a base class's member in a derived class?


Use a using-declaration to control a member's access type and to overload member functions across a class hierarchy.





Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap