#include#include using namespace std; int main() { queue myQueue; myQueue.push(5); myQueue.push(10); myQueue.push(15); cout << "Queue contents before pop(): "; while (!myQueue.empty()) { cout << myQueue.front() << " "; myQueue.pop(); } cout << endl; return 0; }
#includeOutput: `Queue contents after pop(): b c` The queue pop function is a part of the C++ Standard Template Library (STL) and is included in the#include using namespace std; int main() { queue myQueue; myQueue.push('a'); myQueue.push('b'); myQueue.push('c'); myQueue.pop(); cout << "Queue contents after pop(): "; while (!myQueue.empty()) { cout << myQueue.front() << " "; myQueue.pop(); } cout << endl; return 0; }