title: Creating User database error "no match for 'operator==' in....." --C++
body: <p>I have been working on a user database in command prompt. It lets you add a user name and password and also sign in. When I compile it I get the error <code>no match for 'operator==' in</code>. I am not quite exactly sure what is causing the it. Also, I have stored all of it in a class.</p>
  
  <p><strong>My header file is:</strong></p>
  
  <pre><code>#ifndef USER_PSW_H
  #define USER_PSW_H
  #include &lt;string&gt;
  
  
  class User_Psw
  {
      public:
          User_Psw();
          void addToDatabase();
          void getNameIndex();
          bool PasswordMatches();
          void UserCheck();
      protected:
      private:
          int sizeOfDatabase;
          int index;
          std::string Usernames;
          std::string Password;
          std::string username;
          std::string password;
  };
  
  #endif // USER_PSW_H
  </code></pre>
  
  <p><strong>The constructor is:</strong></p>
  
  <pre><code>User_Psw::User_Psw()
  {
      const int SIZE = 100;
      index = 0;
      sizeOfDatabase = 0;
      Usernames[SIZE];
      Password[SIZE];
  }
  </code></pre>
  
  <p><strong>The Function with the actual error is:</strong></p>
  
  <pre><code>void User_Psw::getNameIndex()
  {
      for(int i=0; i &lt; sizeOfDatabase; i++)
      {
          if (username == Usernames[i])
          {
              index = i;
          }
      }
  }
  </code></pre>
  
  <p>With the actual line of code containing the error being <code>if (username == Usernames[i])</code></p>
  
  <p>I can also add more code snippets if It is required.</p>