delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/04/20:30:13

From: "smiggy" <ms001a8758 AT blueyonder DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: help with the qsort funtion (c)
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <BJHI6.954$Cf.306909@news1.cableinet.net>
Date: Sat, 05 May 2001 00:22:57 GMT
NNTP-Posting-Host: 62.30.1.77
X-Complaints-To: http://www.blueyonder.co.uk/abuse
X-Trace: news1.cableinet.net 989022177 62.30.1.77 (Sat, 05 May 2001 01:22:57 BST)
NNTP-Posting-Date: Sat, 05 May 2001 01:22:57 BST
Organization: blueyonder (post doesn't reflect views of blueyonder)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Im having problems understanding the qsort function when trying to sort an
element of an array,
for example if i have a number of arrays like the following

steve 00122334
martin 91002123
james 01323254

can anyone help me, im trying to sort the above information by the first 2
characters of the number section (i.e. 00215354) which correspond to the
year.  00 would be 200, 91 would be 1991 etc.  so that i may output the data
in order as the following....

martin 91002123
steve 00122334
james 01323254

im new to c so any help will be much appreciated, any in depth explanation
of the qsort function will also be appreciated.

Thanks
martin


- Raw text -


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