作者EEmuse2 (忘了密码)
看板EE_DSnP
标题Re: [问题] dlist compiling error Orz
时间Thu Dec 28 11:28:09 2006
※ 引述《ohb (好胜的命运是失落 I》之铭言:
: 前面都过了 直到这里....
: > compiling: ltest.cpp
: In file included from ltest.cpp:3:
: ltest.h:64: warning: friend declaration `std::ostream&
: operator<<(std::ostream&, const DList<T>::LTestObj&)' declares a non-template
: function
: ltest.h:64: warning: (if this is not what you intended, make sure the
: function template has already been declared and add <> after the function
: name here) -Wno-non-template-friend disables this warning
: ltest.h:108: error: expected `;' before "getPos"
: ltest.h:122: error: expected `;' before "void"
: 然後後面就是一大串的ltest.h和ltest.cpp和../../include/dlist.h的error
: 这是怎麽了呢orz
: 因为後面一大串 我就没贴了
: 如果需要完整板 请推文告诉我@@
: 谢谢 orz
我也遇到一样的情形
而且他说我的_head _tail没有宣告
../../include/dlist.h: In constructor 'DList<T>::DList()':
../../include/dlist.h:39: error: '_head' was not declared in this scope
../../include/dlist.h:39: error: '_tail' was not declared in this scope
../../include/dlist.h: In destructor 'DList<T>::~DList()':
../../include/dlist.h:42: error: there are no arguments to 'clear' that depend on a template parameter, so a declaration of 'clear' must be available
../../include/dlist.h:42: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../include/dlist.h:42: error: '_tail' was not declared in this scope
想请教一下
谢谢!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.4.242
1F:→ EEmuse2:array slist都有过 12/28 11:38
2F:推 cookieben:我也遇到这样的情况 12/28 13:30
3F:推 ric2k1:会不会是括弧括错了? 12/28 19:28