title: C++ What does size parameter in qsort do
body: <p>In qsort:</p>
  
  <pre><code>void qsort (void* base, size_t num, size_t size, int (*compar)(const void*,const void*));
  </code></pre>
  
  <p>Documentation explains:</p>
  
  <pre><code>size
  Size in bytes of each element in the array.
  size_t is an unsigned integral type.
  </code></pre>
  
  <p>But usually qsort is invoked as <code>qsort(...,...,sizeof(int),...)</code>, or <code>qsort(...,...,sizeof(char *),...)</code></p>
  
  <p>If I am understanding correctly, since size of string can not be determined, so it does not matter anymore, instead use sizeof(char*) as a type declaration.</p>
  
  <p>Any explanations?</p>