摘要:
代码1 #include <iostream> using namespace std; class A{ public: A(int _a):ma(_a){ cout<<"A()"<<endl; } ~A(){ cout<<"~A()"<<endl; } protected: int ma; }; 阅读全文
摘要:
虚基类/抽象类 抽象类:有纯虚函数的类 代码1 class A{ public: int ma; protcted: int mb; private: int mc; } //B继承 A, class B : public A{ public: int md; potected: int me; p 阅读全文