Mail Archives: djgpp/1997/03/14/12:42:12
Paul Derbyshire wrote:
>
> Eyal Ben-David (eyalb AT aks DOT com) writes:
> >>> Is there an algorithm available for a very fast sort?
> >
> >>Look at the sources for the 'qsort()' function, which is
> >>part of djlsr201.zip which implements the Quick Sort
> >>algorithm.
> >>
> >
> > As an alternative if you use C++ and you know about templates,
> > look at the header file <DJGPP>/lang/cxx/algo.h
> >
> > This file is the STL implementation of many algorithms (including sort)
>
> Well, even were I to have an STL compiler for DJGPP (I only have gcc
> and g++, not even gnu pascal or g77), I don't know the STL language,
> whatever it is, and therefore could not translate STL code into C.
> (Plus translating is a pain, learning a new language for a single
> freaking function is a bigger pain, and there must be C++
> implementations of sorts somewhere that don't involve downloading the
> world's biggest zipfile!)
>
just to re-emphasize the orignal posters' (sadly) missed point:
> > As an alternative if you use C++ and you know about templates,
> > look at the header file <DJGPP>/lang/cxx/algo.h
note the "_if_you_use_C++" part. these should be obvious clues that STL
is _not_ a new language. i think it is going to be part of the standard
C++ library. further, you do not need to download megabytes of zip files
if you already have what you need to compile and build C++ libraries.
everything should be on your hard drive.
STL stands for standard template library. there is documentation for it
on the web; go to alta vista.
-- Sinan
*******************************************************************
A. Sinan Unur WWWWWW
|--O+O
mailto:sinan DOT unur AT cornell DOT edu C ^
http://www.people.cornell.edu/pages/asu1/ \ ~/
*******************************************************************
- Raw text -