0

What is the difference between int &r and int r?

I'm new to this

OWSam
  • 537
  • 1
  • 9
  • 23

1 Answers1

0

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/

tenfour
  • 36,141
  • 15
  • 83
  • 142