在類的函數聲明中,“const”的最后一個意思是什么?何謂const在這樣的聲明里?這個const把我弄糊涂了。class foobar{
public:
operator int () const;
const char* foo() const;};
3 回答

撒科打諢
TA貢獻1934條經驗 獲得超2個贊
const
:
const foobar fb;fb.foo();
- 3 回答
- 0 關注
- 1149 瀏覽
添加回答
舉報
0/150
提交
取消