在头文件中的我有件事要的效果:实例结构内部类定义生成编译器错误
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