C++: warning: comparison with string literal results in unspecified behaviour [-Waddress]
<p>I've started learning/using bits of C++, Ruby background.</p>

<p>Can someone help me with the below code?</p>

<p>I have no idea what's wrong but it's causing this error message:</p>

<blockquote>
  <p>C++: warning: comparison with string literal results in unspecified
  behaviour [-Waddress]</p>
</blockquote>

<pre><code>void OnUserConnect(LocalUser* user)
{
    if (user-&gt;MyClass-&gt;name.c_str() == "user") {
        ServerInstance-&gt;SNO-&gt;WriteToSnoMask('a', "Triggered: %s", user-&gt;MyClass-&gt;name.c_str());
    }
}
</code></pre>