int &sonny = songqiao;
In C++, a reference variable is an alias for another object. It is created using the
& sign. Two things to note:
- Anything done to the reference also happens to the original.
- Aliases cannot be changed to alias something else.
References and Pointers
Lesson 1 of 1