use*_*152 3 c++ templates
我该如何工作?T=int当C++ 似乎完全无视它时,为什么让我写?
T=int
template<class T=int> class Foo { public: T a; }; int main() { Foo f; //error: missing template arguments before ‘f’ }
bil*_*llz 5
Foo 是一个模板,你还需要写:
Foo
Foo<> f; // ^^
归档时间:
12 年,3 月 前
查看次数:
66 次
最近记录: