在頭文件中的我有件事要的效果:實例結構內部類定義生成編譯器錯誤
class MoveableObject
{
public:
static float Gravity;
static float JumpSpeed;
static float MoveSpeed;
struct State;
struct Derivative;
State current;
State previous;
};
當試圖編譯我得到的錯誤:
12:9: error: field 'current' has incomplete type
13:9: error: field 'previous' has incomplete type
這可能是一個非常基本的錯誤,但我很難過。謝謝。
向我們展示State'的'的定義,並確保'State'定義之前,它是用過的。 – 2013-03-25 04:07:55