#define MAX_QUEUE_SIZE 6
static char queue[MAX_QUEUE_SIZE];
int main(void)
{
int front, rear;
front = rear = -1;
int ret;
addQeueu(&rear, 'A');
addQeueu(&rear, 'B');
addQeueu(&rear, 'C');
ret = delQueue(&front, rear);
system("pause");
return 0;
}
void addQeueu(int last, int data)
{
if(*last == MAX_QUEUE_SIZE - 1) {
queue_full(); // 구현은 생략
return;
}
queue[++*last] = data;
}
void delQueue(int first, int last)
{
if(*first == last) {
return queue_empty(); // 구현은 생략
}
return queue[++*first];
}