title: Sorting strings using qSort
body: <p>According to this <a href="http://www.cplusplus.com/reference/clibrary/cstdlib/qsort/" rel="nofollow noreferrer">site</a>, I have done the following program which sorts strings.</p>
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  char list[5][4]={&quot;dat&quot;,&quot;mai&quot;,&quot;lik&quot;,&quot;mar&quot;,&quot;ana&quot;};
  int main(int argc, char *argv[])
  {
      int x;
      puts(&quot;sortirebamde:&quot;);
       for (x=0;x&gt;sizeof(list)/sizeof(char);x++)
       printf(&quot;%s\n&quot;,list[x]);
        qsort(&amp;list,(sizeof(list)/sizeof(char)),sizeof(list[0]),strcmp);
      system(&quot;PAUSE&quot;);
      return EXIT_SUCCESS;
  }
  </code></pre>
  <p>Here is the error I get</p>
  <pre><code>13 C:\Documents and Settings\LIBRARY\Desktop\string_sortireba.cpp invalid conversion from `int (*)(const char*, const char*)' to `int (*)(const void*, const void*)' 
  13 C:\Documents and Settings\LIBRARY\Desktop\string_sortireba.cpp   initializing argument 4 of `void qsort(void*, size_t, size_t, int (*)(const void*, const void*))' 
  </code></pre>
  <p>Please help</p>