Witam.
Próbuję wywołać funkcję którą pobieram z tablicy wskaźników do funkcji, i wywala mi błąd:
"Error: expression preceding parentheses of apparent call must have (pointer-to) function type"
class Class
{
typedef void (Class::*PtrType) (void);
PtrType funcPtr[2];
Class()
{
funcPtr[0] = &Class::MakeA;
funcPtr[1] = &Class::MakeB;
PtrType tmpFuncPtr = funcPtr[1];
tmpFuncPtr(); // Tutaj IntelliSense podkreśla mi błąd
}
void Class::MakeA ()
{
}
void Class::MakeB ()
{
}
};
Próbowałem jakoś zrzutować wskaźnik do funkcji na typ void (*) (void) ale to nic nie dało.