title: C++ char or logical operator? Why takes else{...} if correct?
body: <pre><code>        #include &lt;iostream&gt;
  
                  int main()
                  {
                      char username[15];
                      char password[15];
  
  
                      std::cout &lt;&lt; "Hello, please login to continue your action.&lt;Max 15 Char&gt;" &lt;&lt; std::endl;
                      std::cout &lt;&lt; "Username: ";
                      std::cin &gt;&gt; username;
                      std::cout &lt;&lt; "Password: ";
                      std::cin &gt;&gt; password;
  
                      if (username == "User" &amp;&amp; password == "qwerty")
                      {
                          std::cout &lt;&lt; "Hello, creator.";
                      }
                      else 
                      {
                          std::cout &lt;&lt; "Invalid Login";
                      }
  /*23 row*/          std::cout &lt;&lt; std::endl &lt;&lt; std::endl &lt;&lt; "Username=" &lt;&lt;username &lt;&lt; std::endl &lt;&lt; "Password=" &lt;&lt; password;
  
                      std::cout &lt;&lt; std::endl &lt;&lt; std::endl &lt;&lt; "Press Enter to close the window . . . ";
                      std::cin.clear();
                      std::cin.sync();
                      std::cin.get();
                  }
  </code></pre>
  
  <p>When i type correct it should say Hello Creator but it only goes to invalid i thinked maybe char stores only 1 char thats why at 23 row i taked look what is stored in char username and pasword but everything is fine. Why then it takes Else {...} sentence?</p>