Typedef function pointer?

后端 未结 6 2086

I\'m learning how to dynamically load DLL\'s but what I don\'t understand is this line

typedef void (*FunctionFunc)();

I have a few questio

6条回答
  •  名媛妹妹
    2020-11-22 03:29

    Without the typedef word, in C++ the declaration would declare a variable FunctionFunc of type pointer to function of no arguments, returning void.

    With the typedef it instead defines FunctionFunc as a name for that type.

提交回复
热议问题