This question has already been answered:
- How to declare a function pointer in C / C ++ 3 responses
How to set a type alias указатель на функцию with typedef ?
This question has already been answered:
How to set a type alias указатель на функцию with typedef ?
A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .
Something like this, with the right number of arguments and the type of result.
typedef bool (*t_func)(int,int); bool isEqual(int x, int y) { return x == y; } t_func my_func = &isEqual; call: (* my_func) (7, 3);
Source: https://ru.stackoverflow.com/questions/529524/
All Articles