討論串[問題] 關於inline與class的問題
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者littleshan (我要加入劍道社!)時間16年前 (2009/04/13 19:01), 編輯資訊
0
0
0
內容預覽:
是的。. 請回想一下 inline 的作用:在呼叫端直接展開 function 的內容。. inline int f(int i) { return i+1; }. int XXX(). {. int x = 10;. int y = f(x); // compiler 在這邊把 f(x) 直接代換
(還有905個字)

推噓3(3推 0噓 10→)留言13則,0人參與, 最新作者zesiva (呼拉拉)時間16年前 (2009/04/13 15:39), 編輯資訊
0
0
0
內容預覽:
若是這樣寫 compiler會過. 但是要是你有呼叫. Value 這個函式的話. VC 2005就會顯示compiler error link1120, 無法解析的外部符號. a.h. class TreeNode. {. private:. public:. NodeVector * Child
(還有658個字)
首頁
上一頁
1
下一頁
尾頁