错误LNK2019:函数___tmainCRTStartup中引用的未解析的外部符号_WinMain @ 16
当我运行如下的简单代码时,我有两个错误如下:
#include <iostream>#include <string>using namespace::std;template <class Type>class Stack{public: Stack (int max):stack(new Type[max]), top(-1), maxsize(max){} ~Stack (void) {delete []stack;} void Push (Type &val); void Pop (void) {if (top>=0) --top;} Type& Top (void) {return stack[top];} //friend ostream& operator<< (ostream&, Stack&);private: Type *stack; int top; const int maxSize;};template <class Type>void Stack <Type>:: Push (Type &val){ if (top+1<maxsize) stack [++top]=val;}
错误:
MSVCRTD.lib(crtexew.obj):错误LNK2019:
_WinMain@16
函数中引用的未解析的外部符号___tmainCRTStartup
我该怎么办?
慕工程0101907
胡子哥哥
相关分类