title: returning two values from one function in c++
body: <p>Can I return two values from function one intiger and boolean? I tried to do this in this way but its doesnt work.</p>
  
  <pre><code>int fun(int &amp;x, int &amp;c, bool &amp;m){
          if(x*c &gt;20){
             return x*c;
            m= true;
              }else{
                  return x+c;
                  m= false;
                  }
  
  
  fun(x, c, m);
      if(m) cout&lt;&lt;"returned true";
      else cout&lt;&lt;"returned false";
  
          }
  </code></pre>