title: error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
body: <p>While I am running the simple code as below I have two errors as following:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace::std;
  
  template &lt;class Type&gt;
  class Stack
  {
  public:
      Stack (int max):stack(new Type[max]), top(-1), maxsize(max){}
      ~Stack (void) {delete []stack;}
      void Push (Type &amp;val);
      void Pop (void) {if (top&gt;=0) --top;}
      Type&amp; Top (void) {return stack[top];}
      //friend ostream&amp; operator&lt;&lt; (ostream&amp;, Stack&amp;);
  private:
      Type *stack;
      int top;
      const int maxSize;
  };
  
  template &lt;class Type&gt;
  void Stack &lt;Type&gt;:: Push (Type &amp;val)
  {
      if (top+1&lt;maxsize)
          stack [++top]=val;
  }
  </code></pre>
  
  <p>Errors:</p>
  
  <blockquote>
    <p>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol <code>_WinMain@16</code> referenced in function <code>___tmainCRTStartup</code>  </p>
  </blockquote>
  
  <p>What Should I do?</p>