#include <iostream>
int main()
{
int intValue;
int &intReference = intValue;
intValue = 5;
std::cout << "intValue: " << intValue << std::endl;
std::cout << "intReference: " << intReference << std::endl;
intReference = 7;
std::cout << "intValue: " << intValue << std::endl;
std::cout << "intReference: " << intReference << std::endl;
return 0;
}
|