VS 2008是否支持模板?

时间:2012-03-12 09:38:23

标签: visual-studio-2008 templates

运行此细节代码时

#include<iostream>
#include<assert.h>
using namespace std;


template <class T>

int main(){

return 0;
}

它突然写错误

Error   2   fatal error LNK1120: 1 unresolved externals C:\Documents and Settings\STUDENT\My Documents\Visual Studio 2008\Projects\heap_tree\Debug\heap_tree.exe    heap_tree
Error   1   error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup   MSVCRTD.lib heap_tree

VS 2008是否支持模板?

0 个答案:

没有答案