CPlusPlusThings icon indicating copy to clipboard operation
CPlusPlusThings copied to clipboard

基础进阶-const中的例子7:类中使用const例子有误

Open lingcs00 opened this issue 1 year ago • 1 comments

public:
    ...
    int add();
    ...
};
...
int Apple::add(int num)
{
    take(num);
    return 0;
}

上述有个细节有误,申明和定义不一致~

lingcs00 avatar Mar 31 '23 14:03 lingcs00

add() 调用的 take()const 的,估计是原文写错了

laialaodi avatar Apr 01 '23 04:04 laialaodi