+ 2

why we use reference variable instead of pointer ???

whether the working of both is same..

15th Sep 2018, 3:09 PM
priyesh
priyesh - avatar
4 odpowiedzi
+ 4
pz0375 it's not same....once reference is set, it cannot be updated where as pointer can be updated... reference can't be set to null, where as pointer can be null reference variable is used for call by reference
15th Sep 2018, 3:15 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
reference could not store nullptr. It means you don't have to check it before dereference and write code for such exception cases.
15th Sep 2018, 5:16 PM
Sergey Ushakov
Sergey Ushakov - avatar
0
good programe, but there is no Ukrainian language
18th Sep 2018, 7:27 PM
Zhenya
Zhenya - avatar