I have a base class with about 5 classes that inherit the one base class. I also have an array of about 1000 base classes that store the class when I create it.

Baseclass BaseClasses[1024];

When I want to store the variable and use it I do this:

BaseClasses[m_iLoc] = storevariable;
Baseclass *pVar = &BaseEnts[m_iLoc];
ClassCar *pVar2 = (ClassCar *)pVar2;
pVar2->Go();

Yet when I try to get some data from the BaseClasses it seems that some of the data is wrong or corrupt. I think this is because the BaseClasses variable is Baseclass only and not one of the other classes. What can I do to fix this?