title: C++ .h and .cpp file separate
body: <p>I'm trying to separate my c++ code to one header and one cpp file, but the interpreter showing some errors.</p>
  
  <p>Here is my code:</p>
  
  <p><strong>Password.h:</strong></p>
  
  <pre><code>#ifndef PASSWORD_H
  #define PASSWORD_H
  
  class Password {
  private:
      string aliasName_;
      int hashOfPassword_;
  public:
      void setAliasName(string aliasName);
      void setHashOfPassword(int hashOfPassword);
      string getAliasName() { return aliasName_; }
      int getHashOfPassword() { return hashOfPassword_; }
  };
  
  #endif
  </code></pre>
  
  <p><strong>Password.cpp:</strong></p>
  
  <pre><code>#include &lt;string&gt;
  #include "Password.h"
  
  using std::string;
  
  void Password::setAliasName(string aliasName) {
      aliasName_ = aliasName;
  }
  void Password::setHashOfPassword(int hashOfPassword) {
      hashOfPassword_ = hashOfPassword;
  }
  </code></pre>
  
  <p>Errors:</p>
  
  <pre><code>Error   C2065   'aliasName_': undeclared identifier X\password.cpp  7
  Error   C2511   'void Password::setAliasName(std::string)': overloaded member function not found in 'Password'  X\password.cpp  6
  Error   C3646   'aliasName_': unknown override specifier    X\password.h    6
  Error   C4430   missing type specifier - int assumed. Note: C++ does not support default-int    X\password.h    6
  Error   C2061   syntax error: identifier 'string'   X\password.h    9
  Error   C3646   'getAliasName': unknown override specifier  X\password.h    11
  Error   C2059   syntax error: '('   X\password.h    11
  Error   C2334   unexpected token(s) preceding '{'; skipping apparent function body  X\password.h    11
  </code></pre>
  
  <p>Anyone have any ideas ?</p>