Genralizing Pointer Routines

Robert Nelson Gasch rg2c+ at andrew.cmu.edu
Tue Dec 11 17:41:17 AEST 1990


I have a question concerning dynamically allocated data structures. An
aquaintance told me this was possible, but did now know the deatils.

In PASCAL, if you have 3 linked lists of different pointer types,
you have to write 3 different Insert, search & delete routines; one
for each pointer type. I was wondering if these routines can be 
generalized for any pointer type in C? This would mean that you
could write each routine only once, which would then operate on all
3 pointer types. If this can be done, what are the details involved??

Thanx ---> Rob



More information about the Comp.lang.c mailing list