theVoidOne
Solid State Member
- Messages
- 19
so this is my function head in c:
void merge(void *arr, int start, int end, void *temp, Compare_fn cmp, size_t num_elem, size_t elem_size)
arr is an array of unknown element and cmp is a function that compare the element in array and return an int. so i am trying to figure out how to access arr, like arr[start]? help? can i just typecast the arr to char?
void merge(void *arr, int start, int end, void *temp, Compare_fn cmp, size_t num_elem, size_t elem_size)
arr is an array of unknown element and cmp is a function that compare the element in array and return an int. so i am trying to figure out how to access arr, like arr[start]? help? can i just typecast the arr to char?