How do I declare a method that returns a pointer to a function?
The following method takes parameter a char and returns a pointer to a function. To
avoid this heavy syntax, you may use a typedef.
struct A
{
void (*m(char))(int) { /* ... */ }
};
// ...
A a;
void (*pf)(int);
pf = a.m('a');
0 comments:
Post a Comment