R
Robert
Hello all,
I am a C programmer learning C++. And I am confused with function Pass
by Pointer * or Pass by Reference &.
Function pass by pointer like:
void func(int * x)
And function pass by referencelike:
void func(int & x)
What's their main difference and be used in what circumstance?
Best regards,
Robert
I am a C programmer learning C++. And I am confused with function Pass
by Pointer * or Pass by Reference &.
Function pass by pointer like:
void func(int * x)
And function pass by referencelike:
void func(int & x)
What's their main difference and be used in what circumstance?
Best regards,
Robert