Mail Archives: djgpp/2000/07/07/10:43:07
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01BFE82A.12444E00
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
Hi Nimrod,
thanks for the source, I've compiled as You recomended, but got the same
errors (see in atachment).
Everythink works right when I change
stack<deque<int> > s;
for
stack<int> s;,
but I am not sure if it is the same.
I do not have access to any other compiler which support stl, so I ask in
this group.
----- Original Message -----
From: Nimrod Abing <n_abing AT hotmail DOT com>
To: <djgpp AT delorie DOT com>
Sent: Friday, July 07, 2000 6:53 PM
Subject: Re: stl samples or tutorial
// 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
------=_NextPart_000_000B_01BFE82A.12444E00
Content-Type: text/plain;
name="st.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="st.txt"
st.cc: In function `int main()':
st.cc:9: no matching function for call to =
`stack<deque<int,allocator<int>,0>,deque<deque<int,allocator<int>,0>,allo=
cator<deque<int,allocator<int>,0> >,0> >::push (int)'
c:/djgpp/lang/cxx/stl_stack.h:61: candidates are: void =
stack<deque<int,allocator<int>,0>,deque<deque<int,allocator<int>,0>,alloc=
ator<deque<int,allocator<int>,0> >,0> >::push(const =
deque<int,allocator<int>,0> &)
st.cc:10: no matching function for call to =
`stack<deque<int,allocator<int>,0>,deque<deque<int,allocator<int>,0>,allo=
cator<deque<int,allocator<int>,0> >,0> >::push (int)'
c:/djgpp/lang/cxx/stl_stack.h:61: candidates are: void =
stack<deque<int,allocator<int>,0>,deque<deque<int,allocator<int>,0>,alloc=
ator<deque<int,allocator<int>,0> >,0> >::push(const =
deque<int,allocator<int>,0> &)
st.cc:11: no matching function for call to =
`stack<deque<int,allocator<int>,0>,deque<deque<int,allocator<int>,0>,allo=
cator<deque<int,allocator<int>,0> >,0> >::push (int)'
c:/djgpp/lang/cxx/stl_stack.h:61: candidates are: void =
stack<deque<int,allocator<int>,0>,deque<deque<int,allocator<int>,0>,alloc=
ator<deque<int,allocator<int>,0> >,0> >::push(const =
deque<int,allocator<int>,0> &)
st.cc:14: no match for `_IO_ostream_withassign & << =
deque<int,allocator<int>,0> &'
c:/djgpp/lang/cxx/iostream.h:77: candidates are: class ostream & =
ostream::operator <<(char)
c:/djgpp/lang/cxx/iostream.h:78: class ostream & =
ostream::operator <<(unsigned char)
c:/djgpp/lang/cxx/iostream.h:79: class ostream & =
ostream::operator <<(signed char)
c:/djgpp/lang/cxx/iostream.h:80: class ostream & =
ostream::operator <<(const char *)
c:/djgpp/lang/cxx/iostream.h:82: class ostream & =
ostream::operator <<(const unsigned char *)
c:/djgpp/lang/cxx/iostream.h:84: class ostream & =
ostream::operator <<(const signed char *)
c:/djgpp/lang/cxx/iostream.h:85: class ostream & =
ostream::operator <<(const void *)
c:/djgpp/lang/cxx/iostream.h:86: class ostream & =
ostream::operator <<(int)
c:/djgpp/lang/cxx/iostream.h:87: class ostream & =
ostream::operator <<(unsigned int)
c:/djgpp/lang/cxx/iostream.h:88: class ostream & =
ostream::operator <<(long int)
c:/djgpp/lang/cxx/iostream.h:89: class ostream & =
ostream::operator <<(long unsigned int)
c:/djgpp/lang/cxx/iostream.h:91: class ostream & =
ostream::operator <<(long long int)
c:/djgpp/lang/cxx/iostream.h:92: class ostream & =
ostream::operator <<(long long unsigned int)
c:/djgpp/lang/cxx/iostream.h:94: class ostream & =
ostream::operator <<(short int)
c:/djgpp/lang/cxx/iostream.h:95: class ostream & =
ostream::operator <<(short unsigned int)
c:/djgpp/lang/cxx/iostream.h:97: class ostream & =
ostream::operator <<(bool)
c:/djgpp/lang/cxx/iostream.h:99: class ostream & =
ostream::operator <<(double)
c:/djgpp/lang/cxx/iostream.h:100: class ostream & =
ostream::operator <<(float)
c:/djgpp/lang/cxx/iostream.h:104: class ostream & =
ostream::operator <<(long double)
c:/djgpp/lang/cxx/iostream.h:106: class ostream & =
ostream::operator <<(ostream & (*)(ostream &))
c:/djgpp/lang/cxx/iostream.h:107: class ostream & =
ostream::operator <<(ios & (*)(ios &))
c:/djgpp/lang/cxx/iostream.h:108: class ostream & =
ostream::operator <<(streambuf *)
------=_NextPart_000_000B_01BFE82A.12444E00--
- Raw text -