Im trying to get my head around pointers and passing them into functions as arguments.
Ive got some code - I wont bore you with it at this stage - which seems to sucessfully pass an integer pointer from one function to the other.
However when I try to get to the "real" value and print it out I hit a brick wall. I can print the (correct) memory address, but not the value.
Can someone give me a very simple example of how I can do it?
Its something like:
test = 3;
ptrTest = &test;
function2 (int *B)
printf("%s %i\n","DEBUG = ",*B);
function 2 printe the address of B. Ive also tried printing just B and also &B and both seem to print the address too!
I want to print the number 3
Can anyone help?