Mail Archives: djgpp/2000/07/07/04:54:09
// file: staktest.cc
//
// Should compile using gxx
//
// gxx -o staktest.exe staktest.cc
//
#include <iostream>
#include <stack>
#include <deque>
int main ()
{
stack<deque<int> > s;
s.push (42);
s.push (101);
s.push (69);
while (!s.empty ())
{
cout << s.top () << endl;
s.pop ();
}
return 0;
}
----------------
_nimrod_a_abing_
------------------------------------------
Homepage: http://www.geocities.com/n_abing
>From: "Petr Maxa" <maxa AT sse-za DOT sk>
>Reply-To: djgpp AT delorie DOT com
>To: <djgpp AT delorie DOT com>
>Subject: Re: stl samples or tutorial
>Date: Fri, 7 Jul 2000 07:39:43 +0200
>
>Hi everybody,
>I am looking for sample code for stl running with djgpp. I am just testing
>examples from ObjectSpace, but some of them cannot be compiled (stack1.cpp
>for example - see attached file).
>Please let me know about some easy collection of examples which might run
>with djgpp.
>
>Thanks, Petr Maxa.
><< Stack1.cpp >>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
- Raw text -