#include <iostream>
 
using std::cout;
using std::endl;
 
class TestClass
{
  void MyFunc(void);
 
public:
  void PrintMyFuncAddress(void);
};
 
void TestClass::MyFunc(void)
{
  return;
}
 
void TestClass::PrintMyFuncAddress(void)
{
  //printf("%p\n", &TestClass::MyFunc);
  void (TestClass::* ptrtofn)() = &TestClass::MyFunc;
  cout << (void*&)ptrtofn<< endl;
}
 
int main(void)
{
  TestClass a;
 
  a.PrintMyFuncAddress();
}