Topic: A simple sorting question...
Author: ip001b@uhura.cc.rochester.edu (Ivan Pulleyn)
Date: Wed, 24 Nov 93 01:10:27 GMT Raw View
Hi Everyone,
I am trying to implement a generic sort routine in C/C++. What I want to
be able to do is given a structure:
struct thing {
struct thing *next_x;
struct thing *next_y;
int x;
int y;
};
Be able to write a procedure that I could call like this:
head_x=generic_sort(head_x, [sort by x], [use next_x as pointer] );
I am sure this can be done, but have little idea how to go about it.
Thanks,
Ivan......
--
for pgp public key: finger ip001b@uhura.cc.rochester.edu
ivan pulleyn 268 susquehanna rd. rochester, ny 14618 (716) 442-3735
hypereal group po box 18572 rochester, ny 14618 (716) 442-6231