摘要: 今天下午在看c++ primer plus时遇到一个疑问请教个问题,一个类的2个类方法声明为为什么没有产生重定义错误?double & operator[](int i);double operator[](int i) const;比如class Student {....public:double & operator[](int i);double operator[](int i) const;...};student ada[3];ada[1] = ada[3];会不会产生二义性?不明白,,,,,,,,经过网络提问,总结之后得出答案double & opera 阅读全文
posted @ 2013-11-14 13:09 残雪孤侠 阅读(115) 评论(0) 推荐(0) 编辑