title: How to compare string with const char*?
body: <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;string.h&gt;
  using namespace std;
  int main()
  {
          string cmd;
          while(strcmp(cmd.c_str(),"exit")==0 &amp;&amp; strcmp(cmd.c_str(),"\exit")==0)
          {
                  cin&gt;&gt;cmd;
                  cout&lt;&lt;cmd;
          }
          return 0;
  }
  </code></pre>
  
  <p>I am stuck.</p>