Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 434 Bytes

empty.md

File metadata and controls

17 lines (14 loc) · 434 Bytes

empty

Description : empty() function is used to check if the queue container is empty or not. This function returns true, if the queue is empty or false, otherwise.

Example:

    // Empty queue
    std::queue<int> myqueue;
    
    if (myqueue.empty()){
        std::cout << "My queue is empty";
    }
    else{
        std::cout << "My queue is not empty";
    }

Run Code