title: Request for member ‘next’ in something not a structure or union Error
body: <p>I got a problem at this line <code>c-&gt;next=var;</code></p>
  
  <p>and my function is :</p>
  
  <pre><code>{
      struct film
      {  
          int id;
          char nom[50];
          char typeFilm[50];
          int duree;
          int dateSortie;
          struct film *next;
      };
  
  #include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  #include "structure_film.h"    
  #include&lt;stdlib.h&gt;
  
  void ajouter_film(struct film **h,struct film **c)
  {
      struct film *var;
      int s, genre;
      do
      {
          var=(struct film*) malloc(sizeof(struct film));        
          printf("quel est le nom du film que vous voulez ajouter ? \n");
          scanf("%s",var-&gt;nom);  
          printf("\nquel est le type de ce film \n 1-action \n 2-aventure \n 3-romantique \n 4-comedie \n");
          scanf("%d",&amp;genre);
  
          switch(genre)
          {
              case 1 :
                  strcpy((var-&gt;typeFilm),"action");
                  break;
              case 2 :
                  strcpy((var-&gt;typeFilm),"aventure");
                  break;
              case 3 :
                  strcpy((var-&gt;typeFilm),"romantique");
                  break;
              default :
                  strcpy((var-&gt;typeFilm),"comedie");
          }
          printf("\nquel est sa duree ? \n");
          scanf("%d",&amp;var-&gt;duree);
          printf("\nveuillez entrez le numero de reference de ce film : \n");
          scanf("%d",&amp;var-&gt;id);        
          printf("\nquel est l'annee de sortie? \n");
          scanf("%d",&amp;var-&gt;dateSortie);
  
          if (*h==NULL)
          {
              *h=var;
              *c=var;
          }
          else
          {
              printf("i'm in else \n");
              *c-&gt;next=var;
              *c=var;
              var-&gt;next=NULL;
          }
          printf("si vous voulez ajoutez un autre film veuillez tapez 1 si non tapez 0 \n");
          scanf("%d",&amp;s);
      }
      while (s!=0);    
  }
  }
  </code></pre>