C++ programming Inheritance Refresher New classes can be derived from existing classes using a mechanism called "inheritance". Classes that are derived FROM are called "base classes" and derived classes are also known as sub-classes. The following is an example: Inheritance class Vehicle { private: string Make; string Color; ... }; class Car: Vehicle { // member list includes Make and Color // other Car specific members would go here. }; In this example, Vehicle is the base class and Car is the derived class. The car automatically inherits the Make and Color properties and is also free to implement its own properties and methods that are specific for a Car. ...
C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows etc.This page contains examples on basic concepts of C++ programming like: Arrays,loops, functions, pointers, structures etc. All programs in this page are tested and verified.