作者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
1F:推 Aweather:constructor 传进去的东西有误? 12/27 23:59
2F:推 valken:你iterator那样宣告应该是可以的 12/27 23:59
3F:推 EEmuse2:所以说不是iterator问题?还是其他consructor? 12/28 00:01
4F:推 timrau:你的constructors of class iterator有哪几种? 12/28 00:06
5F:→ timrau:怎麽好像和reference code不太一样 @@ 12/28 00:06
6F:推 EEmuse2:找到了!!我把我constructor砍调了!!妈压 12/28 00:21