title: C++ Compile Error (comparison with string literal results in unspecified behaviour)
body: <p>I need help regarding to this message:</p>
  
  <blockquote>
    <p>input_login.cpp:247: warning: comparison with string literal results
    in unspecified behaviour</p>
  </blockquote>
  
  <p>Line is : </p>
  
  <blockquote>
    <p>if (row[maxcols] != "PLAYER")</p>
  </blockquote>
  
  <p>Can somone explain what this error means? First i was thinking is the variable on maxcols so i put DWORD but is not right.</p>
  
  <p>Code is:</p>
  
  <pre><code>if (gm)
  {
      char szQuery1[QUERY_MAX_LEN];
      snprintf(szQuery1, sizeof(szQuery1),"SELECT mAuthority FROM __sv1_common.gmlist WHERE mAccount = '%s'", login);
      std::auto_ptr&lt;SQLMsg&gt; pMsg3(DBManager::instance().DirectQuery(szQuery1));
      int maxcols = pMsg3-&gt;Get()-&gt;uiNumRows;
      if (pMsg3-&gt;Get()-&gt;uiNumRows &gt;= 1)
      {
          MYSQL_ROW row = NULL;
          while ((row = mysql_fetch_row(pMsg3-&gt;Get()-&gt;pSQLResult)))
          {
              if (row[maxcols] != "PLAYER")
              {
                  allowed_to_login = true;
                  break;
              }
              maxcols--;
          }
      }
  }
  </code></pre>