title: strcmp[c++] error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
body: <p>Where am doing wrong in this code? I need only in <code>char</code> types, please don't suggest to use <code>std::string</code>.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  using namespace std;
  
  int main() 
  {
      char *mystring="C:/windows";
      char last_char;
      last_char = mystring[strlen(mystring)-1];
      cout&lt;&lt;"Input: " &lt;&lt;mystring&lt;&lt;endl;
      if(strcmp(last_char,";")!=0)
      {
          strcat(mystring,";");
      }
      cout&lt;&lt;"Output: "&lt;&lt;mystring&lt;&lt;endl;
      return 0;
  }
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>    Compilation error    time: 0 memory: 3340 signal:0
  prog.cpp: In function ‘int main()’:
  prog.cpp:7:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    char *mystring="C:/windows";
                   ^
  prog.cpp:11:25: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
    if(strcmp(last_char,";")!=0)
                           ^
  In file included from prog.cpp:2:0:
  /usr/include/string.h:140:12: error:   initializing argument 1 of ‘int strcmp(const char*, const char*)’ [-fpermissive]
   extern int strcmp (const char *__s1, const char *__s2)
  </code></pre>