我有下面的類的typedef模板類錯誤
template < int rows, int columns >
class Matrix
{
//stuff
};
我做了以下內容:
typedef Matrix<4,4> Matrix3D;
但是我得到的錯誤,當我宣佈在另一大類如下:
class Transform3D
{
public:
Matrix3D matrix;
//some other stuff
};
我看到的錯誤是:
error C2146: syntax error : missing ';' before identifier 'matrix'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
所有這些都是在這行7:
Matrix3D matrix;
這是在2010年VS可能是什麼問題?
哦,那末段差分號:) – 2012-04-19 05:17:10
對不起!將它錯誤地複製到了stackoverflow中,它存在於我的VS代碼中 – 2012-04-19 05:18:00
對'class Transform3D'可見'Matrix'及其''typdef'嗎? – iammilind 2012-04-19 05:19:42