Speaking of references, let me first tell a story: in the yard where we live, there is a little kid named Luo XX. We like to give him a nickname. Seeing that he was not well-nourished, with a relatively big head and a relatively small body, we gave him the nickname "Radish Head". So Luo XX is his real name, and Radish Head is his alias. So what is a reference??
Definition:Reference: it is an alias of a variable.

Note:As far as an alias is concerned, a variable cannot have only an alias without its own real name.
References to Basic Data Types
As in the following piece of code:
Example
References to Structure Types
As in the following piece of code:
Example
References to Pointer Types
References of pointer type are the most complex and difficult to understand part of references, and they also have distinctive features in syntax form.
Definition:
Type *&pointerReferenceName = pointer;
Look at an example:
Example
References as Function Parameters
Before learning references, when we studied C language, we learned such a classic program:
Now that we have learned references, what should it look like to achieve the same functionality?
Example
Original address: https://blog.csdn.net/stop_and_go/article/details/51334137