say I have two compare functions one is a compareInt(char* s1, char* s2) and compareString(char* rp1, char* rp2)
my instructor used this typedef:
typedef int (*COMPAREFUNC)(void*, void*);
COMPAREFUNC compare;
can someone explain what this typedef means??
here's what he does when we wan't to compare int:
and if we want to compareStringCode:compare = (COMPAREFUNC) &compareInt
I don't get all this, can someone help meCode:compare = (COMPAREFUNC)& compareString