sorting an int array 
Author Message
 sorting an int array


Quote:
> Hi all just wondering the best method to sort an integer array

Best on-topic way is qsort().

Quote:
> any code would be helpfull

Yes, it would. Why not post some?


Mon, 11 Feb 2002 03:00:00 GMT  
 sorting an int array

: Hi all just wondering the best method to sort an integer array
: any code would be helpfull

 ANSI C has qsort():

    http://www.dinkumware.com/htm_cl/stdlib.html#qsort

 -- Xavier



Mon, 11 Feb 2002 03:00:00 GMT  
 sorting an int array
Hi all just wondering the best method to sort an integer array
any code would be helpfull

cheers

--
Then GOD said LET THEIR BE LIGHT......



Tue, 12 Feb 2002 03:00:00 GMT  
 sorting an int array


...

Quote:
>> Description:
>> ------------

>> Sorts using the quicksort algorithm.

>> qsort is an implementation of the "median of three" variant of the quicksort
>> algorithm. qsort sorts the entries in a table by repeatedly calling the
>> user-defined comparison function pointed to by fcmp.

>Where did you get this description?  It does NOT describe the standard
>qsort function.  The standard does not specify the algorithm used by
>qsort.  It need not be a quicksort, and certainly need not be any
>particular variant of qsort.

qsort does presubably have to be qsort. ;-)

--
-----------------------------------------


-----------------------------------------



Thu, 14 Feb 2002 03:00:00 GMT  
 sorting an int array
Groovy hepcat genesis was jivin' on Fri, 27 Aug 1999 03:24:23 +1000 in
comp.lang.c.
sorting an int array's a cool scene! Dig it!

Quote:
>Hi all just wondering the best method to sort an integer array
>any code would be helpfull

  Yes it would. It would help us to help you if you would show us the
code you're having trouble with. We're not here to just give you code.
Give us a butcher's at what you've tried. Only then can we help you.
  But a suggestion: you could use the standard function qsort(). Look
this up in your C manual.
--

----- Dig the EVEN NEWER, MORE IMPROVED news sig!! -----

-------------- Shaggy was here! ---------------
    http://aardvark.apana.org.au/~phaywood/
============= Ain't I'm a dawg!! ==============



Fri, 15 Feb 2002 03:00:00 GMT  
 sorting an int array
Hi,

Take a look at the help for the qsort() function.

                                                        Emil

Quote:

> Hi all just wondering the best method to sort an integer array
> any code would be helpfull

> cheers

> --
> Then GOD said LET THEIR BE LIGHT......



Sat, 16 Feb 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Sorting array of pointers to int

2. problem with sorting int array

3. int pointer to int array

4. int to int array problem

5. merge and sort arrays into one array.

6. Converting a string array to a int array

7. int func(int) versus int func(int *) efficacy.

8. (int/int) != int

9. Calling int f(int (*f)(int)) like function in DLL from VB

10. How to do int func(int size,int matrix[][size])

11. Can I sort a structured array using Array.Sort? USING C#

12. Can I sort a structured array using Array.Sort? USING C#

 

 
Powered by phpBB® Forum Software