class GenericClass{};
struct TestStruct
{
int iValue;
TestStruct(int i) :iValue(i) {}
int f(int j)
{
cout << "f(): " << iValue + j << endl;
return iValue + j;
}
};
int main()
{
TestStruct ts(99);
typedef int (GenericClass::* genericMemFuncType)(int);
GenericClass* p = reinterpret_cast<GenericClass*>(&ts);
genericMemFuncType pFunc = reinterpret_cast<genericMemFuncType>(&TestStruct::f);
int result = (p->*pFunc)(1);
cout << result << endl;
}

문법상 말이 안되는데 이걸 컴파일해주네 ㅋㅋ

- dc official App