What is the purpose of having a class member that is a ref type?
<p>I have this code, but it is not a practical example.</p>

<p>Ex.</p>

<pre><code>class Animal
{
   int i;
   int&amp; ref;
   public:
   Animal() : ref(i)
   {
   }
};
</code></pre>

<p>Can anyone provide a real life example where ref is required as a class member so that I can understand it better?</p>
