討論串[問題] reference 問題
共 5 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓8(8推 0噓 14→)留言22則,0人參與, 最新作者kevintwo (MAI舞)時間15年前 (2009/09/15 21:13), 編輯資訊
1
0
0
內容預覽:
有個class 的 constructor 為:. wxWindow(wxWindow* parent,. wxWindowID id,. const wxPoint& pos = wxDefaultPosition,. const wxSize& size = wxDefaultSize,. lo
(還有381個字)

推噓2(2推 0噓 2→)留言4則,0人參與, 最新作者dendrobium (石斛蘭)時間15年前 (2009/09/16 01:27), 編輯資訊
0
0
1
內容預覽:
剛剛看到的. (12.2.5). The temporary to which the reference is bound or the temporary that. is the complete object of a subobject to which the reference is
(還有342個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者littleshan (我要加入劍道社!)時間15年前 (2009/09/16 10:34), 編輯資訊
1
0
0
內容預覽:
Sorry,這邊是我講錯啦~. 底下是破英文翻譯,加上我自己舉的例子。. The temporary to which the reference is bound or the temporary that. is the complete object of a subobject to whi
(還有1548個字)

推噓2(2推 0噓 5→)留言7則,0人參與, 最新作者QQ29 (我愛阿蓉)時間15年前 (2009/09/16 11:54), 編輯資訊
1
0
0
內容預覽:
謝謝l大的解釋但是還有一些地方不解 請教各位. 那為什麼 或是有什麼必要性 必須要使用ref=temp ref這種寫法呢?. 如果我寫. const string s("hello"); 效率 或是 差別在哪?. 我只知道ref可以減少一次copy 但是建構還是需要. 所以跟直接初始物件. 感覺這兩
(還有174個字)

推噓3(3推 0噓 2→)留言5則,0人參與, 最新作者holymars時間15年前 (2009/09/16 22:20), 編輯資訊
0
0
0
內容預覽:
當你需要動態多型的時侯... class AAA {. public:. virtual foo();. }. class BBB : public AAA {. public:. virtual foo();. }. AAA& fake_a = BBB();. fake_a.foo(); // 呼
(還有212個字)
首頁
上一頁
1
下一頁
尾頁