+ 1
Difference between passing by reference and passing by pointers in c++
I've searched the difference but i couldn't understand these items , i can understand about pointers but not reference : can you give an example for them please? 1. Pointers: The dereferencing operator * gives the value of the variable. Reference: Value can be implicitly referenced using the reference name. 2. Pointer: Can point to nothing, null or empty. Reference: Has to be initialized during declaration. 3. Pointer : Uses ‘&’ to reference the address of variable. Reference: Using &, we can get the address of reference (because the address is the same as that of the original variable)
2 Réponses
+ 2
This is what helped me to understand:-
https://www.youtube.com/watch?v=R4iviB8g12A&list=PLRnuLZZ5D0KzAQIanRKPetLl73DoHVn6I&index=2&t=219s
+ 1
Coder Kitten
rodwynnejones
Thanks for a million. You healped me alot.