c++——this指針

   類的this指針就是值類的對象自己   實驗1:若類成員函數的形參 和 類的屬性,名字相同,通過this指針來解決。   1 #include <iostream> 2 using namespace std; 3 class Test 4 { 5 public: 6 Test(int a, int b) //---> Test(Test *this, int
相關文章
相關標籤/搜索