I have the following line of code in my C program.
sprintf(cmd, "test mergesort %n %x %x %?", A, n, x, my_cmp);
my_cmp
is of type Compare_fn
and I need to know how to pass it into this function. This line is used to help execute a command needed for testing purposes.
If anyone knows how to pass a variable of type Compare_fn
into this function, it would be really helpful.
I'm not trying to print anything with my_cmp at all. I have a function that has Compare_fn variable as a parameter and am simply executing the function in the shell.