i cant fix the error

#include<iostream>
#include<string>
#include<queue>
#include<conio.h>
#include<stdlib.h>
#include<cstdio>

using namespace std;

const int MAX=1000;
const int NIL=-1;
int array[MAX];


struct queu{
int front;
int rare;
int count;
}
q;

void create (queu & q) {
q.front = NIL;
q.rare = NIL;
q.count= 0;
}

int isEmpty (queu q) {
return q.count==0;
}

int isFull (queu q) {
return q.count==MAX;
}

void enQueueOrdinary ( int array[], queu & qOCust, int item);
int deQueueOrdinary (int array[], queu & qOCust, int & item);
int enQueuePremium (int array[], queu & qPCust, int item);
int QueuePremium (int array[], queu & qPCust, int & item);


int main()
{
queue <string> qOCust;

char choice='0';
cout<< " WELCOME TO CBE ADDIS ABABA BRANCH"<<endl;
cout<< " CUSTOMER QUEUE MANAGEMENT SYSTEM" <<endl<<endl;
do
{
cout<< "\n\n please select one: " <<endl<<endl;
//The customers whose transaction less than two hundred thousand at a time
cout<< "1. To register the turn of ordinary customers: " <<endl;
//The customers whose transaction more than two hundred thousand at a time
cout<< "2. To register the turn of premium customers: " <<endl;
cout<< "3. To provide service to customer according to their turn at window No. 1:" <<endl;
cout<< "4. To provide service to customer according to their turn at window No. 2:" <<endl;
cout<< "5. To provide service to customer according to their turn at window No. 3:" <<endl;
cout<< "6. To provide service to customer according to their turn at window No. 4:" <<endl;
cout<< "7. To provide service to customer according to their turn at window No. 5:" <<endl;
cout<< "8. To provide service to customer according to their turn at window No. 6:" <<endl;
cout<< "9. Exit" <<endl;
cin>>choice;
switch(choice)
{
case '1':
//variable to hold the number of customer queue
cout<< "Give the Queue Number to Customer: ";
return enQueueOrdinary (array, qOCust, item);
break;

case '2':

cout<< "Give the Queue Number to Customer: ";

break;

case '3': //variable to hold the number of customer queue
cout<< "Dear customer you are being served on window no 1: ";

break;

case '4':
cout<< "Dear customer you are being served on window no 2: ";

break;

case '5':
cout<< "Dear customer you are being served on window no 3: ";

break;

case '6':
cout<< "Dear customer you are being served on window no 4: ";

break;

case '7':
cout<< "Dear customer you are being served on window no 5: ";

break;

case '8':
cout<< "Dear customer you are being served on window no 6: ";

break;

case '9':
cout<< "1";
break;
cout<< "Invalid Choice";
break;
}int QueuePremium (int array[], queu & qOCustomer, int & item);
}
while (choice!='9');
return 0;

}


void enQueueOrdinary ( int array[], queu & qOCust, int item)
{
if (!isFull(qOCust))
{
qOCust.rare = (qOCust.rare + 1)%MAX;
if (isEmpty(qOCust))
{
qOCust.front=q.rare;
array[qOCust.rare]=item;
qOCust.count++;
}
}
}


int deQueueOrdinary (int array[], queu & qOCust, int & item)
{
item = array[qOCust.front];
if (qOCust.count==1)
qOCust.front = qOCust.rare=NIL;
else
qOCust.front =( qOCust.front + 1)%MAX;
qOCust.count--;
}


int enQueuePremium(int array[], queu & qPCust, int item)
{
if (!isFull(qPCust))
{
q.rare = (qPCust.rare + 1)%MAX;
if (isEmpty(qPCust))
{
qPCust.front=q.rare;
array[qPCust.rare]=item;
qPCust.count++;
}
}
}

int deQueuePremium (int array[], queu & qPCust, int & item)

{
item = array[qPCust.front];
if (qPCust.count==1)
qPCust.front = qPCust.rare=NIL;
else
qPCust.front =( qPCust.front + 1)%MAX;
qPCust.count--;
}









closed account (48T7M4Gy)
http://www.cplusplus.com/forum/general/194968/
And that's the second error - please don't duplicate posts

Tick one off and please use code tags <> on the right.

Then you might like to describe the error because all our clairvoyants are away at the moment. :)
Last edited on
Topic archived. No new replies allowed.