title: Get more than one value out of an function
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/321068/returning-multiple-values-from-a-c-function">Returning multiple values from a C++ function</a>  </p>
  </blockquote>
  
  
  
  <pre><code>/************************************************/
  /* Name: premserv                               */
  /* Description: Calculations for premium serv   */
  /* Parameters: N/A                              */
  /* Return Value: premserv                       */
  /************************************************/
  
  float premserv ()
  {
    int daymin = 0;         //Var for day minutes
    int nightmin = 0;       //Var for night minutes
    float daytotal = 0;     //Var for day total
    float nighttotal = 0;   //Var for night total
    float premserv = 0;     //Var for premium service cost
  
    cout &lt;&lt; "\n" &lt;&lt; "Please enter the number of minutes used durring the day (6AM - 6PM): " &lt;&lt; "\n";
    cin &gt;&gt; daymin;
    cout &lt;&lt; "\n" &lt;&lt; "Please enter the number of minutes used durring the night (6PM - 6AM): " &lt;&lt; "\n";
    cin &gt;&gt; nightmin;
  
    daytotal = (daymin - 75) * 0.1;
    nighttotal = (nightmin - 100) * 0.05;
    premserv = 25 + daytotal + nighttotal;
  
    return premserv;
  
  }
  </code></pre>
  
  <p>I need to get the values from daymin, nightmin, and premserv out of the function. I only know how to get 1 value out of a function.</p>