Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/06/08 18:47
Read: times


 
#156436 - You can use any type you like.
Responding to: ???'s previous message
The example code works fine for sorting your array of integers.

If you want to sort a char array, you just change the type in each occurrence of the array to char.

You could use a library sort() but these tend to be quicksort, and can use up more stack than you have. But these generic sorts work with a (void *) and you supply a pointer to the comparison function.

My comment about names was nothing to do with this program corrupting. It was just a general style comment.

David.


List of 9 messages in thread
TopicAuthorDate
Compile error using a bubble sort            01/01/70 00:00      
   Is the array 'uchar' or is it 'int'? Do not mix.            01/01/70 00:00      
   argument consistency            01/01/70 00:00      
      I had one error and type mismatch seen            01/01/70 00:00      
         more careful with decrement unsigned char            01/01/70 00:00      
         Use different identifiers for global and auto            01/01/70 00:00      
            Yes I saw the corruption...            01/01/70 00:00      
               You can use any type you like.            01/01/70 00:00      
                  thanks guys....            01/01/70 00:00      

Back to Subject List