delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/14/12:42:12

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Sorting?
Date: Fri, 14 Mar 1997 07:49:35 -0500
Organization: Cornell University http://www.cornell.edu
Lines: 46
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <3329495F.6EAD@cornell.edu>
References: <2 DOT 2 DOT 32 DOT 19970312203832 DOT 00687230 AT mailhost> <5gaqpt$dbr AT freenet-news DOT carleton DOT ca>
Reply-To: asu1 AT cornell DOT edu
NNTP-Posting-Host: cu-dialup-0053.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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