title: string Comparison
body: <p>I want to compare two user input strings, but not able to do so...</p>
  
  <pre><code>#include "stdafx.h"
  #include "iostream"
  #include "string"
  using namespace std;
  
  int _tmain(int argc, _TCHAR* argv0[])
  {
      string my_string;
      string my_string2;
      cout&lt;&lt;"Enter string"&lt;&lt;endl;
      cin&gt;&gt;my_string;
      cout&lt;&lt;"Enter 2nd string"&lt;&lt;endl;
      cin&gt;&gt;my_string2;
      cout&lt;&lt;my_string&lt;&lt;"  "&lt;&lt;my_string2;
      strcmp(my_string,my_string2);
      int result;
      result= strcmp(my_string,my_string2);
      cout&lt;&lt;result&lt;&lt;endl;
      return 0;
  }
  </code></pre>
  
  <p><strong><em>This error is appearing.</em></strong>
  Error   1   error C2664: 'strcmp' : cannot convert parameter 1 from 'std::string' to 'const char *' c:\users\asad\documents\visual studio 2008\projects\string\string\string.cpp    23  String</p>