   strange function definition
  Hello all, im currently reading a book and i have come accross a strange function definition, it isn't explained and i havent had any experience with anything like it to date, can anyone explain to me how it worksint EnterMsgLoop(bool (*ptr_display)(float timeDelta))i think that the function call calls a function but i dont really know how, thanks in advance :P   
  bool (*ptr_display)(float timeDelta)That's a pointer named ptr_display to a function taking a float (helpfully named timeDelta, though the definition will ignore that) and returning a bool.So int EnterMsgLoop(bool (*ptr_display)(float timeDelta)) is a function taking a pointer to 'a function taking a float and returning a bool' and returning an int.int  foo();   // function returning an intint* foo();   // function returning a pointer to an intint (*foo)(); // pointer to a function returning an int;Yes you are right.That function (EnterMsgLoop) expects to get a pointer to a function as an input.The required function parameter should look something likebool MyFunction(float timeDelta){//do what you are supposed to do herereturn true;}//What is important is the return value (bool) and the float parameter.Then just call with the function as parameter.EnterMsgLoop(MyFunction);There might be some syntaxical error here, but this is the principle.Cheers   ;  Thanks a lot for you'r replies i see now, i just didnt know that passing a function was possible :P well now i do lol   