void f(T)
will pass the argument by value, which means in the function f
, a copy of T
will be made.
void f(T&)
will pass the argument by reference, which means in the function f
, the same variable defined in the caller is used.
void f(T)
will pass the argument by value, which means in the function f
, a copy of T
will be made.
void f(T&)
will pass the argument by reference, which means in the function f
, the same variable defined in the caller is used.