STL : Queue [3] (back, empty, size)


/* STL : Queue [3] (back, empty, size)
Author : Tausiq */

#include
#include
using namespace std;

int main ()
{
queue q;

if ( q.empty () == true )
cout << "queue is empty" << endl; q.push (2); q.push (4); q.push (6); q.push (8); if ( q.empty () == false ) cout << "queue is not empty" << endl; cout << "size: " << q.size () << endl;; cout << "back: " << q.back () << endl; return 0; } [/sourcecode]

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