passing arguments | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

passing arguments

how to know to pass by a value or refrence?

21st Sep 2017, 10:16 AM
anwesh jami
anwesh jami - avatar
1 Réponse
0
By default, it is by value, if you add a & (like bellow), it is by reference int function(int *& pointer);
21st Sep 2017, 11:01 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar