#include #include #include #define SIZE 5 class Queue { private: int queue[SIZE]; int rear; int front; int k; int x; public: Queue() { rear = 0; front = 0; x = 0; } void insert(int item) { // we are starting value of k with one because in case k = (rear+1) % SIZE; // of 0, queue full message will be displayed, although // the queue would be empty if(front==k) { textcolor(YELLOW+BLINK); cprintf("Queue full !! can't insert any more values");cout< queue"<<'['; textcolor(13); cprintf("%d",rear); cout<<']'< queue"<<'['; // front = front % SIZE; cprintf("%d",++x%=SIZE); cout<<']'<<" = "<