title: Error LNK2019: unresolved external symbol "public: __thiscall user::user(void)" (??0user@@QAE@XZ) referenced in function "..."
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix">What is an undefined reference/unresolved external symbol error and how do I fix it?</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to code a college assignment and seem to having problems compiling, i have done a Google search on the error and the fixes I've seen don't work with my code. I would appreciate your help.</p>
  
  <p>Below is the error code :</p>
  
  <pre><code>Error 1 error LNK2019: unresolved external symbol "public: __thiscall user::user(void)" (??0user@@QAE@XZ) 
  referenced in function "void __cdecl `dynamic initializer for 'player''(void)" (??__Eplayer@@YAXXZ) 
  C:\Users\obinyans\Documents\Visual Studio 2010\Projects\test\test\Challenge 1.obj
  </code></pre>
  
  <p>and below is a copy of my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;math.h&gt;
  
  using namespace std;
  
  void storeinfo() ;
  void showinfo() ;
  
  
  class user 
  {
      string firstname, lastname, currentteam, position, status ;
      int age ;
  public:
      user();
      user(string, string, string, string, string, int) ;
      void setFirstName(string fname)
          {firstname = fname;}
      void setLastName(string lname)
          {lastname = lname;}
      void setCurrentTeam(string cteam)
          {currentteam = cteam;}
      void setPosition(string pos)
          {position = pos;}
      void setStatus(string stat)
          {status = stat;}
      void setAge(int _age)
          {age = _age;}
  
      string getFirstName()
          {return firstname ;}
      string getLastName()
          {return lastname ;}
      string getCurrentTeam()
          {return currentteam ;}
      string getPosition()
          {return position ;}
      string getStatus()
          {return status ;}
      int getAge()
          {return age ;}
  };
  
  user player[20] ;
  
  int main()
  {
       ;
  
      int menu ;
  
      cout &lt;&lt; "MENU" &lt;&lt; "\n" ;
      cout &lt;&lt; "\n 1. Store Player Information" ;
      cout &lt;&lt; "\n 2. Show Player Informaton" ;
      cout &lt;&lt; "\n 0. Exit" ;
  
  
      cin &gt;&gt; menu ;
      if (menu = 1)
      {
          storeinfo() ;
      }
      else if (menu = 2)
      {
          showinfo() ;
      }
      else if (menu = 0)
      {
          return 0;
      }
  
  
      cin.get() ;
      return 0 ;
  
  }
  
  void storeinfo()
  {
      string firstname ;
      string lastname ;
      string currentteam ;
      string position;
      string status ;
      int age ;
  
      for (int i=0; i &lt; 3; i++)
      {
          cout &lt;&lt; "Enter First Name : " ; cin &gt;&gt; firstname ;
          player[i].setFirstName(firstname) ;
          cout &lt;&lt; "Enter Last Name : " ; cin &gt;&gt; lastname ;
          player[i].setLastName(lastname) ;
          cout &lt;&lt; "Enter Player's Age : " ;cin &gt;&gt; age;
          player[i].setAge(age) ;
          cout &lt;&lt; "Enter Current Team : " ; cin &gt;&gt; currentteam ;
          player[i].setCurrentTeam(currentteam) ;
          cout &lt;&lt; "Enter Position : " ; cin &gt;&gt; position ;
          player[i].setPosition(position) ;
          cout &lt;&lt; "Enter Status : " ; cin &gt;&gt; status ;
          player[i].setStatus(status) ;
      }
  }
  
  void showinfo()
  {
      for (int i=0; i &lt; 3; i++)
      {
          cout &lt;&lt; "First Name : " &lt;&lt; player[i].getFirstName() &lt;&lt; "        " &lt;&lt; "Last Name : " &lt;&lt; player[i].getLastName() &lt;&lt;
              "       " &lt;&lt; "Age : " &lt;&lt; player[i].getAge() &lt;&lt; "        " &lt;&lt; "Current Team : " &lt;&lt; player[i].getCurrentTeam() &lt;&lt; 
              "       " &lt;&lt; "Position : " &lt;&lt; player[i].getPosition() &lt;&lt; "      " &lt;&lt; "Status :  " &lt;&lt; player[i].getStatus() ;
      }
  }
  </code></pre>
  
  <p>Thanks for any help.</p>