I'm trying to get the index of the element in the array after lfind and bsearch return the pointer to the element that it found. I have this so far:
(char *) (found - cv->baseAddress);
where found is the address of what the functions found, and the base address is the address of element 0. However, the compiler gives me this error:
cvector.c:150:28: warning: pointer of type ‘void *’ used in subtraction cvector.c:150:4: warning: return makes integer from pointer without a cast
What do I do?