Hi all
I'm having a List of Entity's here which I would like to traverse. I want to call the function DisplayEntity for every node. Here's the catch: I have expanded the Entity class (same name different namespace) to have SDL data and methods. So basicly what I'm trying to do is:
1. If the element in list is of type ark::Entity >> do nothing.
2. If the element in list is of type sdl_ark::Entity >> call the function displayEntity.
using namespace sdl_ark;
void Game::displayEntitys(){
std::list<ark::Entity*>::iterator it;
for (it = fEntityList.begin(); it != fEntityList.end(); it++){
sdl_ark::Entity sdlEntity;
(*it) = dynamic_cast<ark::Entity*> (&sdlEntity);
(*it)->displayEntity(fScreen);
}
}
This is the error I get.
77: error: 'class ark::Entity' has no member named 'displayEntity'
If you need anymore info, please do tell me. Thanks for taking a look.