|
-
Feb 1st, 2003, 03:01 PM
#1
Thread Starter
Junior Member
Class and Inheritance problem
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|