title: Returning result via Output-parameter, c++ coding standard
body: <p>I have a member function in my class like this:</p>
  
  <pre><code>int MyClass::m_Func(int&amp; val);
  </code></pre>
  
  <p>in which, I do some operation and put the result in <code>val</code>. And depending upon the result of the operation, I returned different values from the function. Like, if it is successful, I return <code>0</code> or other values if any error occurs. </p>
  
  <p>One of my friend told me that it is not a good practice to pass a reference of a variable to a member function. Is it true? If yes, why so?</p>