title: help with error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
body: <p>i have recently come to this error , i search a lot but i could not find the solution , i made a  win 32 console application(c++) in visual studio 2010 and added 2 header files and 1 .cpp file with main function in it , i did not change the project's properties , your help would be really appreciated. 
  here is my code:</p>
  
  <pre><code>//listNode.h:
  #ifndef LISTNODE_H
  
  #define LISTNODE_H
  
  template&lt; typename item &gt; class Node
  {
  
  private:
  
      item data;
      Node&lt;item&gt; *next;
  
  public:
  
      Node( item d , Node&lt;item&gt; *n );
      void setData( item d );
      item getData();
      void setNext( Node *n );
      Node&lt;item&gt;* getNext();
  
  };
  
  template&lt; typename item &gt; 
      Node&lt; item &gt; :: Node( item d , Node *n )
      {
          data = d;
          next = n;
      }
  
      template&lt; typename item&gt;
      void Node&lt; item &gt; :: setData( item d )
      {
          data = d;
      }
  
      template&lt; typename item&gt;
      item Node&lt; item &gt; :: getData()
      {
          return data;
      }
  
      template&lt; typename item &gt;
      void Node&lt; item &gt; :: setNext( Node *n )
      {
          next = n;
      }
  
      template&lt; typename item &gt;
      Node&lt;item&gt;* Node&lt;item&gt; :: getNext()
      {
          return next;
      }
  
  #endif  
  
  
  //list:
  #ifndef LIST_H
  #define LIST_H
  
  #include "listNode.h"
  
  template &lt; typename item &gt; class List
  {
  private:
  
      Node&lt;item&gt; *first;
      Node&lt;item&gt; *last;
      int numberOfElements;
  
  public:
  
      List( Node&lt;item&gt; *f , Node&lt;item&gt; *l , int num );
      ~List();
      void addFront( item d );
      void addRear( item d );
      void removeFront();
      void removeRear();
      item front();
      item rear();
      bool isEmpty();
      int size();
      void print();
  
  };
  
  
  template &lt; typename item &gt;
  List&lt;item&gt; :: List( Node&lt;item&gt; *f , Node&lt;item&gt; *l , int num )
  {
      first = f;
      last = l;
      numberOfElements = num;
  }
  
  template &lt; typename item &gt;
  List&lt;item&gt; :: ~List()
  {
      for( int i=0 ; i&lt;nummerOfElements ; i++ )
      {
          Node&lt;item&gt; temp = *first;
  
          delete *first;
  
          first = temp.getNext();
  
      }
  
      first = 0;
      last = 0;
      numberOfElements = 0;
  }
  
  
  
  template &lt; typename item &gt;
  void List&lt;item&gt; :: addFront( item d )
  {
      Node&lt;item&gt; newNode( d , first );
  
      first = &amp;newNode;
  
      numberOfElements++;
  }
  
  template &lt; typename item &gt;
  void List&lt;item&gt; :: addRear( item d )
  {
      Node&lt;item&gt; newNode;
      newNode.setData(d);
  
      if( numberOfElements != 0 )
          *last.setNext( &amp;newNode );
  
      last = &amp;newNode;
  
      numberOfElements++;
  }
  
  
  template &lt; typename item &gt;
  void List&lt;item&gt; :: removeFront()
  {
      if( numberOfElements != )
      {
  
          Node&lt;item&gt; temp = *first;
  
          delete *first;
  
          first = temp.getNext();
  
          delete temp;
  
          numberOfElements--;
      }
  
      else
          cout &lt;&lt; "list is already empty!\n"
  }
  
  template &lt; typename item &gt;
  void List&lt;item&gt; :: removeRear()
  {
      if( numnerOfElements != 0 )
      {
  
          //finding the node before last : 
  
          Node&lt;item&gt; *beforeLast;
  
          beforeLast = first;
  
          while( true ) 
        {
            if( *beforeLast.getNext() == last )
                break;
  
            beforeLast = *beforeLast.getNext();
        }
  
  
          Node&lt;item&gt; temp = *last;
  
          delete *last;
  
          last = beforeLast;
  
          delete temp;
  
          numberOfElements--;
      }
  
      else
          cout&lt;&lt; "list is already empty!\n"
  }
  
  template &lt; typename item &gt;
  item List&lt;item&gt; :: front()
  {
      if( numberOfElements != 0 )
          return *first.getData();
      else
          return
          -1;
  }
  
  template &lt; typename item &gt;
  item List&lt;item&gt; :: rear()
  {
      if( numberOfElements != 0 )
          return *last.getData();
      else
          return -1;
  }
  
  template &lt; typename item &gt;
  bool List&lt;item&gt; :: isEmpty()
  {
      if( numberOfElements == 0 )
          true;
      else
          false;
  }
  
  template &lt; typename item &gt;
  int List&lt;item&gt; :: size()
  {
      return numberOfElements;
  }
  
  
  
  #endif
  
  
  //main.cpp:
  
  #include &lt;string&gt;
  #include&lt;iostream&gt;
  
  using namespace std;
  
  #include "list.h"
  
  template &lt; typename item &gt;
  int main()
  {
      string atom1("1");
      string atom2("2");
      string atom3("3");
      string atom4("5");
      string atom5("6");
  
      List&lt;item&gt; l1();
  
      l1.addRear( atom4 );
      l1.addRear( atom5 );
  
      List&lt;item&gt; l2();
  
      l2.addRear( atom1 );
      l2.addRear( atom2 );
      l2.addRear( atom3 );
      l2.addRear( l1 );
  
      cout &lt;&lt; l2.front()
  
  
          return 0;
  }
  </code></pre>