Queues in C++

//============================================================================
// Name : queues.cpp
// Author : Ashish Sharda
// Version :1.0
// Copyright : ashishjsharda.wordpress.com
// Description : Queues in C++, Ansi-style
//============================================================================

#include <iostream>
#include<stack>
#include <queue>
using namespace std;
int main()
{

std::queue<int> myqueue;
myqueue.push(10);
myqueue.push(20);
cout<<“Contents in queue are”<<“\n”;
while(!myqueue.empty())
{
cout<<myqueue.front()<<“\n”;
myqueue.pop();
}

}

Advertisements

About qainterviews

Software Geek,QA Expert,Blogger
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s