Data Structures/Queue/Queue (Using Classes).cpp
// functions for item operations to the queue

functions for item operations to the queue
functions for item operations to the queue
void Queue::enqueue()
{
    int val;
    if (isFull())
    {
        std::cout << "Overflow" << std::endl;
        exit(0);
    }
    else if (front == -1 && rear == -1)
    {
        front = 0;
        rear = 0;
    }
    else
    {
        rear++;
    }
    std::cout << "Enter the value of the data: " << std::endl;
    std::cin >> val;
    queue[rear] = val;
}
void Queue :: enqueue ( ) { int val ; if ( isFull ( ) ) { std :: cout << " " << std :: endl ; exit ( 0 ) ; } else if ( front == -1 && rear == -1 ) { front = 0 ; rear = 0 ; } else { rear ++ ; } std :: cout << " " << std :: endl ; std :: cin >> val ; queue [ rear ] = val ; }
functions for item operations to the queue
functions for item operations to the queue
//check for queue overflow
