0

Why pointers?

is it more efficient to pass references instead of values to functions?

2nd Aug 2017, 9:57 AM
Rogelio Monteagudo
Rogelio Monteagudo - avatar
2 Antworten
+ 2
For an integer or double value, it does not make any difference, but if you are passing a matrix with 1000x1000 values, then it is way more advisable to pass by reference or use move semantics.
2nd Aug 2017, 12:43 PM
Denis Felipe
Denis Felipe - avatar