c++ this指針

#include <iostream> using namespace std; /* this 指針是對象建立是產生的,對象沒建立沒有this指針 類型就是對應對象的類指針 注意this指針不是成員,this指針是類每一個成員函數的隱含第一個參數,因此只能在成員函數內部使用this指針,沒法在成員函數外部使用 */ class CStu { public: int a; //this->a
相關文章
相關標籤/搜索