这应该是一个简单的问题,但我想不出问题是什么。
我有一个在vectors.h
中定义3D空间中的向量的结构
/**
* The struct defining vectors in 3D space.
*/
struct b3Vec {
/**
* The size of the vector.
*/
double size;
/**
* The first direction of the vector in degrees.
*/
double dir1;
/**
* The second direction of the vector in degrees.
*/
double dir2;
};
在另一个在world.h
中称为b3World的结构中,我有如下代码:
b3Vec gravitation;
我在Expected specifier-qualifier-list before 'b3Vec'
这一行得到了错误。我正确地包含了头文件,这是我得到的唯一错误。
有谁可以帮我?
发布于 2010-12-20 13:31:44
您需要使用struct
关键字:
struct b3Vec gravitation;
https://stackoverflow.com/questions/4490088
复制