title: C++ -- return x,y; What is the point?
body: <p>I have been programming in C and C++ for a few years and now I'm just now taking a college course in it and our book had a function like this for an example:</p>
  
  <pre><code>int foo(){
    int x=0;
    int y=20;
    return x,y; //y is always returned
  }
  </code></pre>
  
  <p>I have never seen such syntax. In fact, I have never seen the <code>,</code> operator used outside of parameter lists. If <code>y</code> is always returned though, then what is the point? Is there a case where a return statement would need to be created like this? </p>
  
  <p>(Also, I tagged C as well because it applies to both, though my book specifically is C++)</p>