What is the difference between int &r and int r?
I'm new to this
What is the difference between int &r and int r?
I'm new to this
First keep in mind that int& r and int &r are syntactically the same thing: r is a variable of type int&. So r is an integer reference.
To learn more about references in C++, there are plenty of online guides. Here's one: https://www.embedded.com/an-introduction-to-references/