next up previous
Next: How do I specify Up: class and struct Previous: How can I handle

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');



Alexis Angelidis (PhD) 2005-01-11