Okay, so I don't really get this and the way my book explains it just makes it worse.
Passing by value is used if a parameter's data flow is:
A: one-way, into the function.
B: one-way, out of the function.
C: two-way, into and out of the function.
D: A and B
E: B and C
Passing by reference is used if a parameter's data flow is:
A: one-way, into the function.
B: one-way, out of the function.
C: two-way, into and out of the function.
D: A and B
E: B and C
Can someone please explain these to me and how you know the difference?
And while we are at it whats the difference between int& and int?



LinkBack URL
About LinkBacks



