title: Invalid initialization of non-const reference from a rvalue
body: <pre><code>MyObject&amp; MyObject::operator++(int)
  {
  
  MyObject e;
  e.setVector(this-&gt;vector);
  
  ...
  
  return &amp;e;
  }
  
  invalid initialization of non-const reference of type 'MyObject&amp;' from an rvalue of type 'MyObject*'
       return &amp;e;
               ^
  </code></pre>
  
  <p>I am not sure what it's saying. Is it saying that e is a pointer, because it's not a pointer. Also, if you'd make a pointer to the address of e, it would get wiped out at the end of the bracket and the pointer would be lost.</p>