Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <iostream>
  2. #include <queue>
  3. using namespace std;
  4. int main(void){
  5.     queue<int> q;
  6.     q.push(1);//add element
  7.     q.push(2);
  8.     q.push(3);
  9.     while(!q.empty()){//queue is empty or not?
  10.         cout << q.front()<<endl;//get first element
  11.         q.pop();//removie element;
  12.     }
  13.     return 0;
  14. }