Monday, 2 October 2017

c++ - error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

While I am running the simple code as below I have two errors as following:



#include 
#include
using namespace::std;

template
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
void Stack :: Push (Type &val)
{
if (top+1 stack [++top]=val;
}


Errors:




MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup




What Should I do?

No comments:

Post a Comment

casting - Why wasn&#39;t Tobey Maguire in The Amazing Spider-Man? - Movies &amp; TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...