title: Getter seems to crash the program even with 0 errors
body: <p>im new in the C++ world and coding in general, just started studying getters and setters and made areally simple exercise to practice them, the build seems to have 0 errors and 2 minor warnings, however, when I try to use a function to return a private variable and print it, it simply crashes the program, however, if i use the last function I made "getAccount()" It seems to work just fine.</p>
  
  <p>After some poking, it seems like the problem is with the getter functions, just calling them crashes the program, here's the code:</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Person.h"
  using namespace std;
  
  int main()
  {
      User user;
      user.setUser("someuser");
      user.setPassw("somepassword");
  
      cout &lt;&lt; user.getPassw() &lt;&lt; endl;
      cout &lt;&lt; user.getUser() &lt;&lt; endl;
  
      user.getAccount();
  }
  </code></pre>
  
  <p>Person.h</p>
  
  <pre><code>#define PERSON_H
  #include &lt;iostream&gt;
  
  using namespace std;
  
  class User
  {
     private:
          string username;
          string password;
      public:
          string setUser(string usernm);
          string setPassw(string pass);
          string getUser();
          string getPassw();
          void getAccount();
  
  
  };
  
  #endif // PERSON_H
  </code></pre>
  
  <p>Person.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Person.h"
  
  using namespace std;
  
  string User::setUser(string usernm){
      usernm = username;
  }
  
  string User::setPassw(string pass){
      pass = password;
  }
  
  string User::getUser(){
      return username;
  }
  
  string User::getPassw(){
      return password;
  }
  
  void User::getAccount(){
      cout &lt;&lt; "Account is:" &lt;&lt; endl;
      cout &lt;&lt; "Username: " + username &lt;&lt; endl;
      cout &lt;&lt; "Password: " + password &lt;&lt; endl;
  }
  </code></pre>