討論串[問題] placement new & copy ctor
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
開發平台(Platform): (Ex: VC++, GCC, Linux, ...). Ubuntu Linux / g++ 4.6. 問題(Question):. http://ideone.com/f1Ctt. 我先用 operator new [] 要了一塊空間給 p. 之後想把 p 裏面每
(還有113個字)
內容預覽:
說好的 operator new[] 結果你用了 operator new ..... 這個其實做了兩件事:. 1. T temp(kerker); 呼叫 copy ctor 初始化一個暫時物件. 2. *p = temp; 使用 copy assignment 把值複製進 *p. 但事實上 tem
(還有1073個字)
首頁
上一頁
1
下一頁
尾頁