Generic Sort

A

AB

cmp_int_asc is an example function as Pete pointed out. You could write
your own comparison function for a datatype of your choice.
ptr2base = (byte *)base ;

I compiled the code using a C++ compiler, which is why I had to
explicitly typecast it to a byte*
 
R

Richard Heathfield

AB said:
cmp_int_asc is an example function as Pete pointed out. You could write
your own comparison function for a datatype of your choice.


I compiled the code using a C++ compiler,

Please understand that C and C++ are different languages, with distinct
rules. Advice given in comp.lang.c that is correct for C may, and quite
often will, not be suitable for programs compiled under C++ rules,
irrespective of whether those programs are also legal C programs.
which is why I had to explicitly typecast it to a byte*

A minor case in point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top