OK, we have a program that uses a doubly linked list. *top points the the first element, *bottom points to the last.
Certain functions, like the swap function use double pointers as arguments to change where top and bottom point to.
Code:
void swap(song_t *a, song_t *b, song_t **top, song_t **bottom)
...
*top=b;
when calling these functions straight from the main function, we have no problem:
Code:
swap(a, b, &top, &bottom)
the problem is we also have interfaces, functions that call other functions. when the interface calls a function that has these double pointers as arguments, it gives us the error message like "passing arg 3 of 'swap' from incompatible pointer type"
right now the interface has **top and **bottom as arguments and tries to pass &top and &bottom as arguments to other functions.
Is there some other way we should be doing this?