title: Simple C++ password program
body: <p>I'm learning to use C++ and I decided to create a password program where the user is asked for the password and it compares the user input to the password and returns a wrong or a right. For some reason, this programs always returns a wrong and I'm not sure why. It must be something to do with comparing the strings but I'm not sure.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main(){
      string pass = "password";
      string input;
      cout &lt;&lt; "What is your password: ";
      cin &gt;&gt; input;
      if (input==pass){
          cout &lt;&lt; "Correct" &lt;&lt; endl;
      }else{
          cout &lt;&lt; "Wrong" &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>I would love some help from programmers who are in any way more well versed in C++ as I've just transferred over to C++ from Python and the transitions a bit rocky.</p>