hi, thanks for the reply, but should it be
//write in C this example
//function to double the value
void doublemynum(int *num_pointer) // (*num_pointer) gets the contents of num which is pointed to by the pointer
(*num_pointer) = (*num_pointer) * 2;
int num = 10;
printf("The original value is %i\n",num);
printf("The new doubled value is %i ",doublemynum(&num));
printf("The new doubled value is %i ", doublemynum(&num));
printf("The new doubled value is %i ", doublemynum(num));
because we need to reference the location for the variable num?
But i have tried either way and there is a error saying "void value not ignored as it ought to be" why is this so?
Lastly, do we have to put the return *num_pointer in the function??
sorry i am getting used to the ideology of using pointers...