returning referece of a local string object
<pre><code>string&amp; GetMyStr(string&amp; somestr)
{
   string &amp; str=somestr;
   //do something with str
   return str;
}
</code></pre>

<p>str is a local object, but why I can still get the value after return ? I think right after the function return, it too is gone and the return value is not referenced. I think I miss it, maybe.</p>
