65,206
社区成员
发帖
与我相关
我的任务
分享#include<iostream>
using namespace std;
class A{
int x;
public:
A():x(10){};
void print(int n){cout<<"A::print n = "<<n<<", x = "<< x <<endl;};
}
a.print();
//1) push n
//2) lea ecx,a ;//this 指针。
//3) call A::print
PS:
非虚成员函数,编译器,直接安排调用指令.没有多少技巧可言.
Cpersons per;
per.out();
(&per)->out();