Home > Back-end >  The difference between the reference and pointer in data structure
The difference between the reference and pointer in data structure

Time:11-24

Under what circumstances the correct use of references and Pointers

CodePudding user response:

Can reference, can use a pointer, can also use reference using a pointer,
However, a reference is unique) (relative to the C language, C + + C language does not support this kind of grammar, so, your discussion should be within the scope of the C + +,

Reference is abounded the function of pointer, you can use another form to express the function of pointer, personal point of view, for reference,
Suggest the original poster detailed understanding the definition of reference, the definition of the pointer and the differences and similarities, in passing parameters and whether in memory footprint, how much memory, and so on these information

CodePudding user response:

Upstairs analysis is great,,
I personally feel or use a pointer, it looks more natural,
  • Related