Inheritance


Inheritance allows you to define a new class with all the properties of the parent class and to add new data and functions.
Example: derive a new class myVector2 from class Vector2.
class myVector2: public Vector2
{

public:

   [inherited public members of Vector2...]
   [add new public members here...]

protected:

   [inherited protected members of Vector2...]
   [add new protected members here...]

private:

   [private members here...]

}

private members of the parent class are not inherited.