Original Post
Hi all. I have a situation where I have two subclasses of a master class. Basically, when I'm updating one of them, I'd like to be able to modify another variable that's in the other subclass. Here's the code...
std::list<GameObject*>::iterator it3;
it3 = game.GameObjs.begin();
while(it3 != game.GameObjs.end())
{ if((*it3)->objectType == ENEMY_SHOT) //Only check for enemy bullets...
{
Someone had mentioned doing a static_cast, but I can't make any code actually compile. I'm doing something wrong syntactically... But basically, I just want to access the variable in the subclass and change it. Help appreciated thanks.