title: How to sort an array of structs in C?
body: <p>I have got an array of the following structs:</p>
  <pre><code>typedef struct _my_data_ 
  {
    unsigned int id;
    double latitude;
    double longitude;
    unsigned int content_len;
    char* name_dyn;
    char* descr_dyn;
  } mydata;
  </code></pre>
  <p>and I would like to sort it ascending by the <strong>ID</strong> field. I read it is possible to sort arrays using the <code>qsort</code> function but I am not sure how to correctly use it when sorting structs.</p>