title: Error 1 error LNK2019: unresolved external symbol "public: void __thiscall Login::loginMenu(void)
body: <p>I searched through the website and there were answers about default constructor or using #pragma. but I'm using #pragma in my visual studio and I tried to debug but any of those methods didnt work. Please tell where I have made the mistake. Thank you </p>
  
  <p>this is my main,</p>
  
  <pre><code>#include "stdafx.h"
  #include&lt;iostream&gt;
  
  #include "Login.h"
  
  
  using namespace std;
  
  
  
  
  int _tmain(int argc, _TCHAR* argv[])
  {
  
  Login log;
  log.loginMenu();
  
  
  std::cin.get();
  return 0;
  } 
  </code></pre>
  
  <p>login.h is as following,
      #pragma once</p>
  
  <pre><code>class Login
  {
  public:
  void loginMenu();
  };
  </code></pre>
  
  <p>and the Login.cpp file,</p>
  
  <pre><code>#include "stdafx.h"
  #include "Login.h"
  
  #include&lt;iostream&gt;
  #include&lt;string&gt;
  
  using namespace std;
  
  
  void loginMenu()
  {
  int userType;
  
  do{
  
      cout &lt;&lt; "Select 1 for STAFF" &lt;&lt; endl;
      cout &lt;&lt; "Select 2 for HR MANAGER" &lt;&lt; endl;
      cout &lt;&lt; "Select 3 for ADMINISTRATOR" &lt;&lt; endl;
  
      cout &lt;&lt; "Please select your usertype";
      cin &gt;&gt; userType;
  
  
      switch(userType){
      case 1:
          cout &lt;&lt; "You have selected STAFF";
          break;
      case 2:
          cout &lt;&lt; "You have selected HR MANAGER";
          break;
      case 3:
          cout &lt;&lt; "You have selected ADMINISTRATOR";
          break;
      default:
          cout &lt;&lt; "Please make your choice by selecting from 1-3";
      }
  }while(userType==1,userType==2,userType==3);
  
  
  }
  </code></pre>
  
  <p>This is a simple program I created to demonstrate "using classes in separate files.  </p>