摘要:
struct SIndexData { string sCode; int iDate; int iTime; double f1; SIndexData(): iDate(0), iTime(0) { } bool operator == (const SIndexData & obj) const //重载 == 操作符 { return sCode == obj... 阅读全文
posted @ 2017-10-25 20:39
那一剑的風情
阅读(2761)
评论(0)
推荐(0)
摘要:
错误场景:类中的重载函数 编译报错: 函数后面加了 const 就好了。 非静态成员函数后面加const(加到非成员函数或静态成员后面会产生编译错误), 表示成员函数隐含传入的this指针为 const指针, 决定了在该成员函数中,任意修改它所在的类的成员的操作都是不允许的(因为隐含了对this指针 阅读全文
posted @ 2017-10-25 19:42
那一剑的風情
阅读(1462)
评论(0)
推荐(0)

浙公网安备 33010602011771号