摘要:
1 问题引入 问题:类中是否可以定义 const 成员? 示例:下面的类定义是否合法?如果合法,ci 的值是什么,存储在哪里? Demo #include <stdio.h> class Test { private: const int ci; public: int getCI() { retu 阅读全文
摘要:
1 对象的初始化 问题:对象中成员变量的初始值是多少? Demo #include <stdio.h> class Test { private: int i; int j; public: int getI() { return i; } int getJ() { return j; } }; T 阅读全文