作者Hrothgar (小米....超小的....)
看板EE_DSnP
標題[討論] 一個好奇怪的bug~
時間Sun May 17 13:19:51 2009
就是我寫完array.h以後
想說compile 一下
> compiling: adtTest.cpp
adtTest.h:164: error: expected class-name before '{' token
adtTest.h:169: error: 'CmdExecStatus' does not name a type
adtTest.h:176: error: expected class-name before '{' token
adtTest.h:181: error: 'CmdExecStatus' does not name a type
adtTest.h:188: error: expected class-name before '{' token
adtTest.h:193: error: 'CmdExecStatus' does not name a type
adtTest.h:200: error: expected class-name before '{' token
adtTest.h:205: error: 'CmdExecStatus' does not name a type
adtTest.cpp: In function 'bool initAdtCmd()':
adtTest.cpp:21: error: 'cmdMgr' was not declared in this scope
adtTest.cpp: At global scope:
adtTest.cpp:44: error: 'CmdExecStatus' does not name a type
adtTest.cpp:74: error: 'CmdExecStatus' does not name a type
adtTest.cpp:122: error: 'CmdExecStatus' does not name a type
adtTest.cpp:186: error: 'CmdExecStatus' does not name a type
然後冒出了以上的error 囧.......
可是我也沒有去改教授的reference code啊@@
至於我的array.h裡,也沒有少寫{}之類的符號
可以請問教授這會是什麼樣的問題嗎@@"
//感覺我都會碰到一些怪bug....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.250.69
※ 編輯: Hrothgar 來自: 140.112.250.69 (05/17 13:31)
1F:推 bnsblue:也許宣告完class的時候忘記加分號.. 05/17 13:34
2F:→ wanga10219:可能是include裡面的cmdParse.h沒有link到 05/17 17:28
3F:→ wanga10219:或是lib裏的libcmd.a沒有link到 05/17 17:29