please help i cant fix the error with cin

#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;
}


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

template <class T>
void deQueueOrdinary (T array[], queu & qOCust, T & item)
{
item = array[qOCust.front];
if (qOCust.count==1)
qOCust.front = qOCust.rare=NIL;
else
qOCust.front =( qOCust.front + 1)%MAX;
qOCust.count--;
}

template <class T>
void enQueuePremium (T array[], queu & qSCust, T item)
{
if (!isFull(qSCust))
{
q.rare = (qSCust.rare + 1)%MAX;
if (isEmpty(qSCust))
{
qSCust.front=q.rare;
array[qSCust.rare]=item;
qSCust.count++;
}
}
}

template <class T>
void deQueuePremium (T array[], queu & qSCust, T & item)
{
item = array[qSCust.front];
if (qSCust.count==1)
qSCust.front = qSCust.rare=NIL;
else
qSCust.front =( qSCust.front + 1)%MAX;
qSCust.count--;
}
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':

cout<< "Give the Queue Number to Customer: ";
cin>> qOCust;
enQueueOrdinary ( array, qOCust,item );
break;

case '2':

cout<< "Give the Queue Number to Customer: ";
cin >> qOCust;

return enQueuePremium( array, qOCust,item );
break;

case '3': //variable to hold the number of customer queue
cout<< "Dear customer you are being served on window no 1: ";
cin>> qOCust;
return deQueueOrdinary (array, qOCust, item);
break;

case '4':
cout<< "Dear customer you are being served on window no 2: ";
cin>> qOCust;
return deQueueOrdinary (array, qOCust, item);
break;

case '5':
cout<< "Dear customer you are being served on window no 3: ";
cin>> qOCust;
return deQueueOrdinary (array, qOCust, item);
break;

case '6':
cout<< "Dear customer you are being served on window no 4: ";
cin>> qOCust;
return deQueueOrdinary (array, qOCust, item);
break;

case '7':
cout<< "Dear customer you are being served on window no 5: ";
cin>> qOCust;
return deQueueOrdinary (array, qOCust, item);
break;

case '8':
cout<< "Dear customer you are being served on window no 6: ";
cin>> qOCust;
return deQueueOrdinary (array, qOCust, item);
break;

case '9':
cout<< "1";
break;
cout<< "Invalid Choice";
break;
}
}
while (choice!='9');
return 0;

}



















closed account (48T7M4Gy)
http://www.cplusplus.com/forum/general/194967/
That's the first error - please don't duplicate posts
Topic archived. No new replies allowed.