阅读背景:

如何在c++中打印方法指针的地址?

来源:互联网 

For example:

例如:

struct A { void m() { } };

void stream_print() {
  void(A::*p)(void) = &A::m;
  std::cerr << p << std::endl;
}

void printf_print() {
  void(A::*p)(void) = &A::m;
  fprintf(stderr, "%p", p);
}
struct A { void m() { } };



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: