C++11:类的改进

继承构造函数 C++11容许派生类继承基类的构造函数ios #include <iostream> #include <string> using namespace std; class Base { public: Base(int age, int id) :m_age(age) , m_id(id) { cout << "Base" << endl; } private
相关文章
相关标签/搜索