M
mscava
Here are my classes. Each of them has virtual destructor:
class Object { ... };
class Door : public Object { ... };
class ClosedDoor : public Door { ... };
class OpenedDoor : public Door { ... };
and here's a vector of those objects:
vector<Object*> objList;
objList.push_back( new ClosedDoor );
Operator typeid returns class ClosedDoor. But I want to know wheter it
is a Door. Is there a way find this out?
Thanks for replies...
class Object { ... };
class Door : public Object { ... };
class ClosedDoor : public Door { ... };
class OpenedDoor : public Door { ... };
and here's a vector of those objects:
vector<Object*> objList;
objList.push_back( new ClosedDoor );
Operator typeid returns class ClosedDoor. But I want to know wheter it
is a Door. Is there a way find this out?
Thanks for replies...