作者EEmuse2 (忘了密碼)
看板EE_DSnP
標題[問題] compiling error
時間Wed Dec 27 23:49:56 2006
求教一下...
ltest.h:116: instantiated from here
../../include/slist.h:80: error: no matching function for call
to 'SList<LTestObj>::iterator::iterator(SListNode<LTestObj>*&)'
../../include/slist.h:41: note: candidates are:
SList<LTestObj>::iterator::iterator()
../../include/slist.h:41: note:
SList<LTestObj>::iterator::iterator(const SList<LTestObj>::iterator&)
../../include/slist.h: In member function
'SList<T>::iterator SList<T>::end() [with T = LTestObj]':
不太清楚這些意思
是說我的iterator使用錯誤嗎??
我在function中有利用宣告
iterator li(_head),是這種錯誤?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.121.195.62
推 Aweather:constructor 傳進去的東西有誤? 12/27 23:59
推 valken:你iterator那樣宣告應該是可以的 12/27 23:59
推 EEmuse2:所以說不是iterator問題?還是其他consructor? 12/28 00:01
推 timrau:你的constructors of class iterator有哪幾種? 12/28 00:06
→ timrau:怎麼好像和reference code不太一樣 @@ 12/28 00:06
推 EEmuse2:找到了!!我把我constructor砍調了!!媽壓 12/28 00:21