// To clear the queue Q defined as "queue<int> Q"
Q = queue<int>();
//GET FULL KNOWLWEDGE OF QUEUE IN STL ALONG WITH LINE TO LINE EXPLAINATION
#include <iostream>
// this line include queue
#include <queue>
using namespace std;
// Print the queue
// queue<int> q , q is queue of integers
void print_queue(queue<int> q)
{
// run while loop untill q is empty and stop when queue become empty
while (!q.empty())
{
cout << q.front() << " ";
q.pop();
}
cout << '
';
}
int main()
{
queue<int> q;
q.push(1);
q.push(2);
q.push(3);
print_queue(q);
}