references in c++ problem
<p>I heard references in c++ can be intitalized only once but this is giving me 1 is my output and not returning any error!</p>

<pre><code> struct f { 
   f(int&amp; g) : h(g) { 
     h = 1; 
   }

   ~f() { 
     h = 2; 
   } 

   int&amp; h; 
 };

 int i() { 
   int j = 3; 
   f k(j); 
   return j;
 }
</code></pre>
