Class member function pointer

后端 未结 3 1386
抹茶落季
抹茶落季 2020-12-13 16:25

I\'m trying to use a class function (interrupt service routine),

void (ClassName::*fp)(void)=ClassName::FunctionName;

and attaching it to a

3条回答
  •  醉酒成梦
    2020-12-13 16:56

    Each class member function has an implicit first parameter that is the this pointer, so your method in fact is not with void paramter list - it takes one parameter-- the instance it is invoked on.

提交回复
热议问题