Tuesday, 3 January 2012

Standart Template Library >> Queue

#include<iostream>
#include<queue>
#include<stdio.h>

using namespace std;

void main(){
  queue<int>x;
  for(int i=1;i<=10;i++)
    x.push(i);
 while(!x.empty()){
    cout << x.front() << endl;
    x.pop();
 }
}

No comments:

Post a Comment