SUMMARY
  • When a new class is derived in terms of an existing class, the new class is termed as derived class, whereas the existing class is termed as base class.

  • The syntax of derived class definition is as follows:

    class<derived_class_name> : <access modifier> <base class_name>

  • When a class is derived from a base class, it automatically acquires variables and methods from base class. This phenomenon is called inheritance.

  • When we derive a new class from a given base class, we have to specify the method of derivation. Here, keywords public, private and protected are used. Therefore, Turbo C++ manual calls these terms as access modifiers. (It is important to note that these terms are also called access specifiers, when they are present inside ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.