title: c++ reference parameters functions
body: <p>Im having trouble with the reference parameters. The values in <code>getStockInfo</code> are supposed to be stored in reference parameters. I dont know how to do that so that <code>displayStatus</code> accepts those as arguments. Whenever i put something into <code>getStockInfo</code> in main it gives me the error <code>More than one onstance of overloaded function "getStockInfo" matches the argument list</code>. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  
  void getStockInfo(int &amp;, int&amp;, double&amp;);
  void displayStatus(int &amp;, double &amp;);
  
  int main()
  {
     int spoolsOrdered;
     int spoolsStock;
     double specialCharges;
  
     cout &lt;&lt; "Middletown Wholesale Copper Wire Company" &lt;&lt; endl;
  
     getStockInfo(spoolsOrdered, spoolsStock, specialCharges);
  }
  
  void getStockInfo(int &amp;spoolsOrdered, int &amp;spoolsStock, double specialCharges)
  {
     char ship; 
  
     cout &lt;&lt; "How many spools would you like to order: ";
     cin &gt;&gt; spoolsOrdered;
  
     //Validate the spools ordered 
     while(spoolsOrdered &lt; 1)
     {
        cout &lt;&lt; "Spools ordered must be at least one" &lt;&lt; endl;
        cin &gt;&gt; spoolsOrdered;
     }
  
     cout &lt;&lt; "How many spools are in stock: ";
     cin &gt;&gt; spoolsStock;
  
     //Validate spools in stock
     while(spoolsStock &lt; 0)
     {
         cout &lt;&lt; "Spools in stock must be at least 0" &lt;&lt; endl;
         cin &gt;&gt; spoolsStock;
     }
  
     cout &lt;&lt; "Are there any special shipping charges? ";
     cout &lt;&lt; "Enter Y for yes or another letter for no: ";
     cin &gt;&gt; ship;
  
     //Validate special charges
     if(ship == 'Y' || ship == 'y')
     {
      cout &lt;&lt; "Enter the special shipping charge: $";
      cin &gt;&gt; specialCharges;
     }
     else
     {
      specialCharges = 10.00;
     }
  }
  
  void displayStatus(int &amp;backOrder, double &amp;subtotal, double &amp;shipping, double &amp;total)
  {
  }  
  </code></pre>