this 指針的地址--調用成員函數的所在對象的起始地址

#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 o
相關文章
相關標籤/搜索