Hi
Im having trouble passing a pointer to a function as another function's parameter:
this is basicaly what im trying to do, and i think i know what the problem is, i cant have the address of something that hasnt been created yet, and because of that the compiler gives me an error.Code:void takesFuncPtr(bool (*func)()) {} class egg { bool fry(); void passFry(); }; bool egg::fry() {} void egg::passFry() { takesFuncPtr(fry); }
how can i get arround this problem??
tks in advance.