View Single Post
  #1 (permalink)  
Old 03-08-2008, 07:13 PM
vmcg105 vmcg105 is offline
Member
 
Join Date: Mar 2008
Posts: 3
vmcg105 is on a distinguished road
Help with queue array please!!
Could someone please point me in the right direction. I am creating a queue array of customers. I have highlighted the code I am having problems with when trying to intalize the Queue, really cant get around this, any help?



class QueueCustomer{
final int MAXSIZE=5;
Customer queue[] = Customer [MAXSIZE];// Array called queue. Can store up to 5 customers
int qhead;
int qtail;
int qnoElements;

//Construct the queue
QueueCustomer(){
for(Customer tmpCustomer:queue)
tmpCustomer = ' ';

qhead = 0; /* head initialised to 0 to point to start of queue.*/
qtail = -1; /* tail initialised to -1 as the is no end of queue.*/
qnoElements = 0; /* noElements initialised to 0-No elements on queue.*/
}
Reply With Quote
Sponsored Links