Callback-functions

Started by
2 comments, last by test2 22 years, 3 months ago
How to define, implement, pass and call callback-functions?
Advertisement
    bool MyFunc(LPVOID pvParam);typedef bool (*MYFUNC)(LPVOID);bool CallFunc(MYFUNC pFunc, LPVOID pvParam){  return pFunc(pvParam);}int main(int argc, char* argv[]){  CallFunc(MyFunc, NULL);  return 0;}  


That is a trivial and pointless example, but you just need to look into and understand function pointers to do whatever it is you're trying.

Edited by - jonstelly on January 9, 2002 12:02:49 PM
If you check out this thread:
http://www.gamedev.net/community/forums/topic.asp?topic_id=69844

You can see my linked list of functions example.. that''s should help you out a bit to :o).

Billy - BillyB@mrsnj.com

ps. It''s on page 2 of the discussion.
take a look at www.function-pointer.org

This topic is closed to new replies.

Advertisement