討論串[問題] overloading [] 疑問!!
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 25→)留言25則,0人參與, 最新作者QQ29 (我愛阿蓉)時間16年前 (2010/01/07 23:35), 編輯資訊
0
0
0
內容預覽:
^^^^^^^剛剛對const有點模糊了... 爬了文. 可是我發現little大這例子好像有點問題. 我之前也是看這篇 觀念上說 const是修飾this. 但是return data 這個data好像也會被冠上const 所以這樣return會compile 錯. 想問一下修飾this 意思是說

推噓4(4推 0噓 2→)留言6則,0人參與, 最新作者littleshan (我要加入劍道社!)時間16年前 (2009/07/16 12:30), 編輯資訊
0
0
0
內容預覽:
我覺得你的問題在於你可能不太清楚 const member function 的意義。. 所謂的 const member function 就是在宣告時於宣告式後加上 const:. class Foo {. public:. void f(); // normal member function
(還有1927個字)

推噓1(1推 0噓 2→)留言3則,0人參與, 最新作者cassey (惡魔凱西)時間16年前 (2009/07/16 11:19), 編輯資訊
0
0
0
內容預覽:
目前正在看 C++ How to Program 5th Edition. 第 11.8 章裡面有提到有關 overload [] 的程式. // overloaded subscrpit operator for non-const Arrays;. // reference return cre
(還有535個字)
首頁
上一頁
1
下一頁
尾頁