摘要: 1. 类的成员访问控制类的成员三种访问类型:public,private,protected(默认为private)while, 结构体的默认访问类型为public2. const成员函数class A { public: void func ( ) const; /* promise not... 阅读全文
posted @ 2015-06-12 15:07 xiaokuang 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1. 默认参数要为某个参数设置默认值,则必须为它右边所有参数提供默认值int harpo(int n, int m = 0, int j = 5) /* VALID */int chico(int n, int m = 6, int j) /* INVALID *... 阅读全文
posted @ 2015-06-12 13:00 xiaokuang 阅读(167) 评论(0) 推荐(0) 编辑