title: Can someone please look at my queue?
body: <p>I am using Dev C++. The program crashes as soon as I enter a name into the queue and press enter</p>
  
  <pre><code>void queue (Client c[])
  {
      int choice,tail=0,max=20,front=0,ch,w;
      char queue [20];
  
      do {
          printf ("Do You Want To (1)Enter Clients To A Queue or (2)Remove Clients From A Queue?");
          scanf ("%d",&amp;choice);
      }while (choice&lt;1 || choice&gt;2);
  
      if (choice==1)
      {
          if (tail==max-1)
          {
              printf("Queue is full!");
              return;
          }
  
          tail++;
          printf("Enter Client Name:");
          scanf (" %[^\n]",queue[tail]);            
          if (front==-1)
              front++;
      }
      else if (choice==2)
      {
          if (front==-1)
          {
              printf("Queue is empty!");
              return;
          }
          printf("Enter Client Name To Remove:");
          scanf (" %[^\n]",queue[front]);
          if (front==tail)
              front=tail=-1;
          else
              front++;
      }
  
      do {
          printf ("Do You Want To (1)Queue More Clients or (2)Continue?");
          scanf ("%d",&amp;ch);
      }while (ch&lt;1 || ch&gt;2);
  
      if (ch==1)
      {
          void queue (Client []);
          queue (c);
      } 
      else if (ch==2)
      {
          do{
              printf ("Do You Want To Go Back To (1)The Main Menu Or (2)Exit?");
              scanf ("%d",&amp;w);
          }while (w&lt;1 || w&gt;2);
  
          if (w==1)
          {
              void main_menu (Client[]);
              main_menu (c);   
          }
          else if (w==2)
          {
              void end (Client []);
              end (c);
          }
      }                 
  }
  </code></pre>