delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/07/02:39:25

Message-ID: <002e01bfe7d5$c0c74b80$0307028a@prmivv03>
From: "Petr Maxa" <maxa AT sse-za DOT sk>
To: <djgpp AT delorie DOT com>
References: <005d01bfe74f$4724f420$0307028a AT prmivv03>
Subject: Re: stl samples or tutorial
Date: Fri, 7 Jul 2000 07:39:43 +0200
Organization: SSE s.p. Zilina
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_002B_01BFE7E6.83EB6640
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: 7bit

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.

------=_NextPart_000_002B_01BFE7E6.83EB6640
Content-Type: application/octet-stream;
	name="Stack1.cpp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Stack1.cpp"

// This example compiles using the new STL<ToolKit> from ObjectSpace, =
Inc.
// STL<ToolKit> is the EASIEST to use STL that works on most =
platform/compiler=20
// combinations, including cfront, Borland, Visual C++, C Set++, =
ObjectCenter,=20
// and the latest Sun & HP compilers. Read the README.STL file in this=20
// directory for more information, or send email to =
info AT objectspace DOT com.
// For an overview of STL, read the OVERVIEW.STL file in this directory.

#include <iostream.h>
#include <stl.h>

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;
}

------=_NextPart_000_002B_01BFE7E6.83EB6640--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019