c++自定義指針類型、*和->運算符重載

#include<iostream> #include<memory> using namespace std; class A { public: A(int id) { this->id = id; cout<<"A(int)"<<endl; } ~A() { cout<<"~A()"<<endl; } void print() { cout<<this->id<<endl; } priv
相關文章
相關標籤/搜索