/* Queue follows FIFO structure. It means First Input First Output */
#include<iostream>
#include<queue>
using namespace std;
int main()
{
int i=52;
queue<int> q; // you can write double / string type queue also
q.push(50);
q.push(62);
q.push(14);
q.pop(); // it will pop first number 50
q.push(i);
printf("The size of queue is now %d\n\n", q.size() );
while( !q.empty() ){ // if not empty then continue
printf("-> %d\n", q.front() );
q.pop();
}
printf("\n\t\t*** Thanks ...\n");
getchar();
return 0;
}
/*
In the same way, you can use Stack
#inlcude<stack>
// Declare:
stack<double> s; // now, write your code . . .
// In same way you can use Priority queue
// Declare
priority_queue<int > q; // now, write your code . . .
*/