struct MyClass { int foo () { return 0; } }; unsigned int size = sizeof(MyClass::foo); // obviously error
Can we apply sizeof() to mem
sizeof()
Use
sizeof(int (MyClass::*)())
since you're taking the "size of a member function pointer of MyClass that returns int and takes no arguments".
MyClass
int