0

How does call by reference work in C++?

Is it merely another variation of pointer (call by address), only better? Or is there a subtle difference?

21st Jun 2022, 3:03 PM
Anindya Dey
Anindya Dey - avatar
1 Odpowiedź
+ 2
Both serve same purpose. Using reference will make alias name. Using pointer will make a new pointer variable which can be reassigned.. Hope this helps, for more details. https://hackr.io/blog/pass-by-reference-vs-pass-by-pointer https://www.sololearn.com/discuss/3045056/?ref=app
21st Jun 2022, 3:30 PM
Jayakrishna 🇮🇳