Mail Archives: djgpp/1998/06/11/06:17:29
Hi gsm,
I've just been using DJGPP and have used the list iterator for the STL succesfully (
with help from
people in this news group ).
An example would be something like...
list< NODE > NodeList;
where NODE is a templatized class or some other standard type. In your function you
could do
something like this...
list< NODE> :: iterator x;
NODE myNode;
x = find( NodeList.begin(); NodeList.end(); myNode );
if( x != NodeList.end(); )
{
cout << "Node found" << endl;
}
else
{
cout << "Inserting new Node at the end" << endl;
NodeList.push_back( myNode );
}
I was using version 2.8.1 and you probably know this already but I'll
mention it just in case... You must have a " #include <list> "in you file followed
by the
" using namespace std; "
I hope this helps.
Salvador Eduardo Tropea (SET) wrote:
> gsm77 AT aol DOT com (GSM77) wrote:
>
> > I'm using for a long time the standard lists and the associated iterators of
> > BORLAND C++.
> >
> > But now, i want to make my programs work with GPP, and i don't know how to use
> > the iterators of Gpp. I don't understand how to declarate it !!!, and how to
> > use it...
> >
> > Please any help !
>
> Don't you have the Borland Sources? perhaps you can recompile it with djgpp. I
> had the BC++ 3.1 sources for all the classlib.
>
> SET
> ------------------------------------ 0 --------------------------------
> Visit my home page: http://set-soft.home.ml.org/
> or
> http://www.geocities.com/SiliconValley/Vista/6552/
> Salvador Eduardo Tropea (SET). (Electronics Engineer)
> Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
> ICQ: 2951574
> Address: Curapaligue 2124, Caseros, 3 de Febrero
> Buenos Aires, (1678), ARGENTINA
> TE: +(541) 759 0013
--
Ciao,
Dominique Louis
===========================================================
From . . . . . . . : Dominique Louis
( Savage Software Solutions )
Web Site . . . . . : http://www.SavageSoftware.com.au
IBM Mail Exchange : AU5PVDKV
Email. . . . . . . : savage AT ccsaus DOT e-mail DOT com ( on Site )
Dominique_Louis AT BigPond DOT com ( Office )
===========================================================
- Raw text -