given the following array (for example):
int arr[6] = {1 , 2 , 3 , 4 , 5, 6};
If I send it to function with the following decleration:
int func(void* array, int n);
How can I send from func
to the following function:
int f(void* element);
address for some element in the array?
I tried to do something like that: f(array + i);
(in order to send &array[i]
) , but I get the following error:
pointer of type 'void *' used in arithmetic
So , how can I do it?