title: how to understand the return references in c++ functions?
body: <pre><code>string&amp; message(){
      static string str = "good good";
      return str
  }
  </code></pre>
  
  <p>In the above code, the returned type of the function should be a reference to a string variable based on its signature. Well, on the other hand, inside of the function definition, a variable of type string is returned. Based on my understanding, object and the reference of object are sort of inter-changable? Or did I miss something here?</p>