我有下面的类的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