Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在类私有范围内定义模板变量时遇到了一些麻烦
private: template<class T>;
我使用visual c++ 2010所以出了什么问题!
您缺少变量名称。你也不能像这样声明一个模板化的成员变量,你必须模板化类,并使用T.
T
template < class T > class A { T var; };