I cannot imagine the syntax for declaring a function pointer as a static member.
#include <iostream>
using namespace std;
class A
{
static void (*cb)(int a, char c);
};
void A::*cb = NULL;
int main()
{
}
g ++ throws the error "cannot declare a pointer to` void 'member ". I suppose I need to do something with parentheses, but void A :: (* cb) = NULL does not work either.
user176622
source
share