/*
  Reference variable.
  
  type&   defines a (lvalue) reference.
  
  A reference defines another identifier, which is identical to a preexisting variable.
  
  Technical:
  With the C++11 standard rvalue references also came into being: type&& is a rvalue reference.
  http://thbecker.net/articles/rvalue_references/section_01.html
*/


#include <iostream>
using namespace std;

int main()
{
   int  n=3;
   int& m=n;

   cout << "n=" << n << "\n";
   m=42;
   cout << "n=" << n << "\n";
   
   cout << "m=" << m << "\n";
   n=4;
   cout << "m=" << m << "\n";

   return 0;
}
