[an error occurred while processing this directive]
|
class LED{public:void Toggle(void);};
void LED::Toggle(void){
}
typedef void (*pvf)();
void func(void *pFunc)
{pvf handlerFunc=(pvf)pFunc;
handlerFunc(); // È íàêîíåö çäåñü âûçîâ ôóíêöèè
}
int main(void)
{
LED LED_0;
void *pLED_0=&LED_0.Toggle; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
func(pLED_0);
}
Дает есдинственную ошибку в строке //!!!!
Error[Pe300]: a pointer to a bound function may only
be used to call the function