i have one header file Matrix4x4.h . it includes another header files. when i compile the code. it gives error "C2236: unexpected 'class' 'Matrix3x3'. Did you forget a ';'? " where i made mistake. how can i fix the problem. thanks in advance
Code:#ifndef matrix4x4 #define matrix4x4 #include "Vector2D.h" #include "Vector3D.h" #include "Vector4D.h" #include "Matrix3x3.h" class Matrix3x3; // compiler shows here error C2236 class Matrix4x4 { public: .................................. .................................. Matrix4x4& operator=(const Matrix4x4& matrix1); Matrix4x4& operator=(const Matrix3x3& matrix1); friend Matrix4x4 operator-(const Matrix4x4& matrix1, const Matrix4x4& matrix2); friend Matrix4x4 operator+(const Matrix4x4& matrix1, const Matrix4x4& matrix2); friend Matrix4x4 operator*(const Matrix4x4& matrix1, const Matrix4x4& matrix2); friend Matrix4x4 operator*(const Matrix4x4& matrix1, const Matrix3x3& matrix2); friend Vector4D operator*(const Matrix4x4& matrix1, const Vector4D& v); friend Vector3D operator*(const Matrix4x4& matrix1, const Vector3D& v); friend Vector2D operator*(const Matrix4x4& matrix1, const Vector2D& v); friend Vector4D operator*(const Vector4D& v, const Matrix4x4& matrix1); friend Vector3D operator*(const Vector3D& v, const Matrix4x4& matrix1); friend Vector2D operator*(const Vector2D& v, const Matrix4x4& matrix1); friend Matrix4x4 operator*(float t, const Matrix4x4& matrix1); friend Matrix4x4 operator*(const Matrix4x4& matrix1, float t); public: float m[16]; }; #endif


Reply With Quote
Bookmarks