大家帮忙看下到底是怎么回事啊!!好象总是说类CVector3没有定义。 自定义类如下 class CCamera { public: CCamera(); CVector3 Position() {return m_vPosition;} //100行 CVector3 View() {return m_vView;} CVector3 UpVector() {return m_vUpVector;} CVector3 Strafe() {return m_vStrafe;} void PositionCamera(float positionX,float positionY,float positionZ,float viewX,float viewY,float viewZ,float upVectorX,float upVectorY,float upVectorZ); void RotateView(float angle,float X,float Y,float Z); void SetViewByMouse(); void RotateAroundPoint(CVector3 vCenter,float X,float Y,float Z); void StrafeCamera(float speed); void MoveCamera(float speed); void CheckForMovement(); void Update(); void Look(); private: CVector3 m_vPosition; CVector3 m_vView; Cvector3 m_vUpVector; CVector3 m_vStrafe; } 编译时出现错误:[C++ Error] Unit1.cpp(100): E2303 Type name expected(One of these errors has occurred: In declaring a file-level variable or a struct field, neither a type name nor a storage class was given. In declaring a typedef, no type for the name was supplied. In declaring a destructor for a C++ class, the destructor name was not a type name (it must be the same name as its class). In supplying a C++ base class name, the name was not the name of a class.) [C++ Error] Unit1.cpp(100): E2139 Declaration missing (Your source file contained a struct or union field declaration that was not followed by a semicolon.Check previous lines for a missing semicolon.)怎么搞的啊,到底怎么定义类CVector3啊,好急啊!各位大哥帮帮忙!!!
自定义类如下
class CCamera
{
public:
CCamera();
CVector3 Position() {return m_vPosition;} //100行
CVector3 View() {return m_vView;}
CVector3 UpVector() {return m_vUpVector;}
CVector3 Strafe() {return m_vStrafe;}
void PositionCamera(float positionX,float positionY,float positionZ,float viewX,float viewY,float viewZ,float upVectorX,float upVectorY,float upVectorZ);
void RotateView(float angle,float X,float Y,float Z);
void SetViewByMouse();
void RotateAroundPoint(CVector3 vCenter,float X,float Y,float Z);
void StrafeCamera(float speed);
void MoveCamera(float speed);
void CheckForMovement();
void Update();
void Look();
private:
CVector3 m_vPosition;
CVector3 m_vView;
Cvector3 m_vUpVector;
CVector3 m_vStrafe;
}
编译时出现错误:[C++ Error] Unit1.cpp(100): E2303 Type name expected(One of these errors has occurred: In declaring a file-level variable or a struct field, neither a type name nor a storage class was given.
In declaring a typedef, no type for the name was supplied.
In declaring a destructor for a C++ class, the destructor name was not a type name (it must be the same name as its class).
In supplying a C++ base class name, the name was not the name of a class.)
[C++ Error] Unit1.cpp(100): E2139 Declaration missing (Your source file contained a struct or union field declaration that was not followed by a semicolon.Check previous lines for a missing semicolon.)怎么搞的啊,到底怎么定义类CVector3啊,好急啊!各位大哥帮帮忙!!!