Skip to content

Instantly share code, notes, and snippets.

@aa-ahmed-aa
Created March 6, 2016 16:52
Show Gist options
  • Save aa-ahmed-aa/203741818f662a8fc3cf to your computer and use it in GitHub Desktop.
Save aa-ahmed-aa/203741818f662a8fc3cf to your computer and use it in GitHub Desktop.
#include <iostream>
#include <queue>
using namespace std;
int main()
{
queue<int> List;
int var;
cout << "Please enter Int (enter 0 to end): "<<endl;
do {
cin >> var;
List.push(var);
} while (var);
cout << "myqueue contains: ";
while (!List.empty())
{
cout << ' ' << List.front();
List.pop();
}
cout << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment