title: Pass a reference to a reference
body: <p>I think it's illegal to pass a reference to a reference in C++.However ,when I run this code it gives me no error.</p>
  
  <pre><code>void g(int&amp; y)
  {
     std::cout &lt;&lt; y;
     y++;
   }
  
   void f(int&amp; x)
  {
    g(x);
  }
  int  main()
  {
    int a = 34;
    f(a);
    return 0;
  
   }
  </code></pre>
  
  <p>Doesn't the formal parameter of
      g()
  qualify as a reference to a reference ??</p>