64,680
社区成员
发帖
与我相关
我的任务
分享
class Derive
{
public:
int i;
virtual void f() { cout << "Derive::f" << endl; }
void g(int i) { cout << "Derive::g(int):i" << endl; }
void h() { cout << "Derive::h" << endl; }
};
int main()
{
void (Derive::*p)(int) = &Derive::g;
cout<<hex<<p<<endl;
printf("%#x", p);
system("pause");
return 0;
}
cout<<boolalpha<<hex<<p<<endl;//这样就明白了