摘要:
const applies to the thing left of it. If there is nothing on the left then it applies to the thing right of it. const默认作用于其左边的东西,否则作用于其右边的东西 const 常量 阅读全文
摘要:
首先上一个例子 class Example { public: int x; int y; //函数初始化列表 Example ():x(a),y(b){} //函数内部赋值 Example (){ this->x=a; this->y=b; } 以下四种情况下需要使用初始化成员列表: 一、需要初始 阅读全文