title: How do you use a typedef struct for a FIFO?
body: <p>I just started programming in C for school. I am being asked to do a program that uses a FIFO struct to resolve math problems. I got the folowing code on the internet for a FIFO, I just don't know how to use it. I tried a lot of things and I can't find anything useful on the internet or maybe that I just don't know the right thing to research but could you please help me? Thanks!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  typedef struct pile
  {
      int donnee;
      struct pile *precedent;
  } Pile;
  
  void pile_push(Pile **p_pile, int donnee)
  {
          Pile *p_nouveau = malloc(sizeof *p_nouveau);
          if (p_nouveau != NULL)
          {
                  p_nouveau-&gt;donnee = donnee;
                  p_nouveau-&gt;precedent = *p_pile;
                  *p_pile = p_nouveau;
          }
  }
  
  int pile_pop(Pile **p_pile)
  {
      int ret = -1;
      if (p_pile != NULL)
      {
          Pile *temporaire = (*p_pile)-&gt;precedent;
          ret = (*p_pile)-&gt;donnee;
          free(*p_pile), *p_pile = NULL;
          *p_pile = temporaire;
      }
      return ret;
  }
  
  void pile_clear(Pile **p_pile)
  {
      while (*p_pile != NULL)
      {
          pile_pop(p_pile);
      }
  }
  </code></pre>
  
  <p>I tried doing this:</p>
  
  <pre><code>int main()
  {
      int return_val;
      Pile pile;
      pile_push(Pile, 5);
      return_val = pile_pop(Pile);
      printf(return_val);
  }
  </code></pre>
  
  <p>and got this error:</p>
  
  <pre><code>expected expression before 'Pile'
  too few arguments to function 'pile_push'
  </code></pre>