[問題] State Pattern
請看
http://ideone.com/IaLTR
對原有的模型作點變化(其實也是參考網路上其它人的code...)
但是錯誤訊息就滿怪的,不知道為什麼
(感覺有點像函數原型和函數定義那種感覺,只是現在遇到的是類別)
錯誤訊息如下
GState.h(20): E2315 'SetState' is not a member of 'GStateFlow',
because the type is not yet defined
E2303 Type name expected
E2121 Function call missing )
GStateFlow.h(11): E2303 Type name expected
E2034 Cannot convert 'int *' to 'GState *'
E2379 Statement missing ;
GStateFlow.h(14):E2315 'NextState' is not a member of 'GState',
because the type is not yet defined
以下略,大致上都類似這樣的錯誤,請問我是忽略了哪個環節嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.251.174.202
→
03/13 13:22, , 1F
03/13 13:22, 1F
→
03/13 13:50, , 2F
03/13 13:50, 2F
推
03/13 14:04, , 3F
03/13 14:04, 3F
→
03/13 14:05, , 4F
03/13 14:05, 4F
→
03/13 14:06, , 5F
03/13 14:06, 5F
→
03/13 14:07, , 6F
03/13 14:07, 6F
→
03/13 15:04, , 7F
03/13 15:04, 7F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章