Hi, i wish to store a mix of derived classes in one array.
so i make the array from the base class i.e.
and fill it with my classes.
The base class has a method.
this is overridden in all the child classes and used as follows,
my problem arises when array[x] is a 2nd derived class i.e.
base--->1stderived class--->2nd derived class
it will only access the print() of the 1st derived class.
i.e. the 2ndDerivedClass::print() is NEVER accessed by the program.
Base* one = new 2ndDerivedClass(..arguments..);
the problem ONLY happens when the 2ndDerivedClass is stored in the array.
Please help :(