#include #include using namespace std; int main() { int i {10}; int c {i}; //The value of c is a copy of the value of i. //At this point, there are two ints in memory. ++c; //This has no effect on the value of i. cout << "i == " << i << "\n" << "c == " << c << "\n\n"; int j {20}; int& r {j}; //The value of r is always the same value as the value of j. //At this point, there is only one int in memory //(not counting the i and c from the previous example). //To access this int, we can write either j or r. ++j; //Increment the value of j. ++r; //Another way to increment the value of j. cout << "j == " << j << "\n" //Output the value of j. << "r == " << r << "\n"; //Another way to output the value of j. return EXIT_SUCCESS; }