title: Pointers to Structures in C
body: <p>When trying to compile the following code, I am getting a warning that line 18 makes integer from pointer without cast and that 19 and 20 are incompatible types in assignment.  I am new to structures in C, and can't seem to figure out what is wrong.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  struct song
  {       char title[70];
  };
  
  struct playlist
  {       struct song songs[100];
  };
  
  void title_sort(struct playlist * list,int len)
  {       int swapped = 1,i;
          char hold;
          while (swapped)
          {       swapped = 0;
                  for (i = 0;i &lt; len - 1; i++)
                  {       if (list-&gt;songs[i].title &gt; list-&gt;songs[i+1].title)
                          {       hold = list-&gt;songs[i].title;
                                  list-&gt;songs[i].title = list-&gt;songs[i+1].title;
                                  list-&gt;songs[i+1].title = hold;
                                  swapped = 1;
                          }
                  }
          }
  }
  
  int main()
  {       struct playlist playlist;
          int i;
          for (i = 0;i &lt; 5;i++)
          {       fgets(playlist.songs[i].title,70,stdin);
          }
          title_sort(&amp;playlist,5);
          printf("\n");
          for (i = 0;i &lt; 5;i++)
          {       printf("%s",playlist.songs[i].title);
          }
          return 0;
  }
  </code></pre>