#include<iostream>
using namespace std;
class Test
{
int x;
public:
Test(int a){
x=a;
}
void get_this();
};
void Test:: get_this()
{
cout<<"this points to"<<this<<endl;
}
int main()
{
Test obj(12);
cout<<"obj address:"<<&obj<<endl;
obj.get_this();
}
obj address:0x23fe40
this points to0x23fe40
--------------------------------
Process exited after 3.464 seconds with return value 0
请按任意键继续. . .