Bit confused with inheritance
Hey, I have been recently doing an assignment and have gotten myself a bit confused.
Essentially, I have 4 different classes, 1 of which is a base class and 3 of which are derived from the base class.
I now have an array which is of the same type as the base class, and if I want to insert a derived class into that array, I can do so because it inherits it's parent classes type.
Now this is where I am confused, how do I access derived classes methods when trying to access the classes through the array? It only allows me to access the base types methods.