討論串[問題] template list<T>iterator
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者littleshan (我要加入劍道社!)時間16年前 (2009/06/12 11:07), 編輯資訊
0
0
0
內容預覽:
typename std::list<T>::iterator m_itor;因為在對 template 進行 parse 時,compiler 不知道 T 是什麼,也無法推斷 list<T>::iterator 到底是個型別,亦或只是 list<T>. 底下的 static member。加上 t

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者qazq (...)時間16年前 (2009/06/12 10:52), 編輯資訊
0
0
2
內容預覽:
class TEST. {. private:. std::list <T> m_lst;. public:. T start(). {. std::list <T>::iterator it;. it = m_lst.begin();. return *it;. }. };. 這樣沒有問題。. p
(還有200個字)
首頁
上一頁
1
下一頁
尾頁