struct MyClass {
int foo () { return 0; }
};
unsigned int size = sizeof(MyClass::foo); // obviously error
Can we apply sizeof()
to member methods from outside the class
? Do we need to declare object to get it ?
Edit: I know that above code will give error (that's why word 'obviously'). Wanted to know if we can at all apply the sizeof() to a member method. I don't want to describe the use case for that in length.