Hey all,
So I have the following code
cBlock is the derived class of what is stored in ObjVec.
Shouldn't the FreeMe function be called by the derived class. In the header it is set as a virtual function. I know that this element being tested in the static cast is on instance of cBlock. the use of dynamic_cast resulted in at false result in the if statement.
all guidance would be appreciated.
~Xtreampb~
So I have the following code
if(static_cast<cBlock*>(&ObjVec[t]))
{
ObjVec[t].FreeMe();
}
cBlock is the derived class of what is stored in ObjVec.
Shouldn't the FreeMe function be called by the derived class. In the header it is set as a virtual function. I know that this element being tested in the static cast is on instance of cBlock. the use of dynamic_cast resulted in at false result in the if statement.
all guidance would be appreciated.
~Xtreampb~