title: What is "operator int&() { return i; } " doing in the code
body: <p>I came across this code just few minutes back here in Stack Overflow.
  I was confused about what actually  <code>operator int&amp;() { return i; }</code> is doing in the code.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;conio.h&gt;
  
  using namespace std;
  
  class INT {
  public:
              INT(int ii = 0) : i(ii) {}
              operator int&amp;() { return i; }
              void display()
              {
                cout &lt;&lt; "value of i is : " &lt;&lt; i;       
              }
  private:
    int i;
  };
  
  int main()
  {
    INT l;
    cin &gt;&gt; l;
    l.display();
    getch();
    return 0;
  }
  </code></pre>
  
  <p>I added the display function just to get some insight. I saw that the value that I get from <code>cin &gt;&gt; l;</code> gets assigned to <code>i</code> which is private member of object <code>l</code>. So this is 
  some sort of overloading definitely I guess.</p>
  
  <p>Can you let me know can we take the value of the object of class from directly through <code>cin</code>? Does it work fine? </p>
  
  <p>What if I have two <code>int</code> variables in private part of my <code>class INT</code>?</p>