i tested the following code as my teacher told me but it wont do what i want it to
vector<GameObjects*> blockers;
blockers.push_back(new Wall(pictures,i,j));
vector<GameObjects*>::iterator k = blockers.begin();
for(;k != blockers.end(); k++){
cout << typeid(**k).name() << endl;
}
what i want to get is "Class Wall"
but i only get Class GameObjects
or Class GameObjects *
what am i doing wrong? i should be able to get "class Wall" from using this typeid
right?
thanks!