作者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
→ EEmuse2:array slist都有過 12/28 11:38
推 cookieben:我也遇到這樣的情況 12/28 13:30
推 ric2k1:會不會是括弧括錯了? 12/28 19:28