Consider this:
My question is: Instead of using "&variable" and "*var" as parameters, couldnt we just use "variable" and "var"?Code:void function1() { int variable = 5; function2(&variable); } void function2 (int *var) { *(var) = 10; //Function1.variable now is 5 return; }
What is the point of using pointers in a function?



LinkBack URL
About LinkBacks



