Original Post
Hi, I want to call a function pointer, and define to which funtion it goes by a char instead of just writing the function name down. Hard to explain, but the code below speaks for itself Function to be called
void AILevelOne(Monster *monster)
{
monster->SetX(500);
} I have this function which takes a function pointer void Monster::Update(void(*AIUpdate)(Monster*))
{
AIUpdate(this);
} Later on, i have this which calls the function pointer Monster::Update(AILevelOne) // That works But i want this Monster::Update(monster_properties.ai_func) // ai_func is a char with
// "AILevelOne" And that doesnt work Is there a way to do this? [Edit: Made the post pretty - Oluseyi] [Edited by - Oluseyi on January 20, 2005 7:02:21 AM]