討論串[問題] operator= overloading
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 2→)留言2則,0人參與, 最新作者mcdrumer時間14年前 (2011/11/25 16:05), 編輯資訊
0
0
0
內容預覽:
借用標題問一下~~. class Array. {. public:. const Array& operator=(const Array&);. 略. };. //const return avoids: (x=y)=z. const Array& Array::operator=(const
(還有198個字)

推噓0(0推 0噓 4→)留言4則,0人參與, 最新作者jehovah (Lucius)時間15年前 (2010/06/25 13:13), 編輯資訊
0
0
0
內容預覽:
這是書上的例題, 有個觀念請教. 若要overloading = 符號,. 讓自訂的Array 型別可以實現 Array1=Array2. 書本給的程式碼簡化如下:. class Array. {. public:. const Array& operator=(const Array&);. 略.
(還有264個字)
首頁
上一頁
1
下一頁
尾頁