title: How can I fix "Overloaded member function not found" error?
body: <p>I keep getting the following error:</p>
  
  <blockquote>
    <p><code>"overloaded function not found in 'pizza'"</code></p>
  </blockquote>
  
  <p>This referring to <code>void outputDescription</code> and <code>double computePrice</code> functions, below. I can't figure out what is wrong. </p>
  
  <p>I am a beginner to C++ but the code looks right. This is for class. I'm supposed to have at least 1 mutator function and 1 accessor function, a function to compute price and a function to output the description of the pizza.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  
  class pizza
  {
      public:
          void getOrder (string, string, int, int) ;
          void outputDescription (string&amp;, string&amp;, int&amp;, int&amp;) const;
          double computePrice (string&amp;, int&amp;, int&amp;) const;
      private:
          string type;
          string size;
          int pepperoni;
          int cheese;
  };
  
  int main ()
  {
      pizza customerpizza;
      double price;
      string type;
      string size;
      int pepperoni;
      int cheese;
  
      customerpizza.getOrder (type, size, pepperoni, cheese);
      customerpizza.outputDescription (type, size, pepperoni, cheese);
      price = customerpizza.computePrice (size, pepperoni, cheese);
  
      cout &lt;&lt; "Total cost is $" &lt;&lt; price &lt;&lt; ".\n";
  
      system("PAUSE");
      return 0;
  }
  
  void pizza::getOrder (string type, string size, int pepperoni, int cheese)
  {
      int pizzaType;
      int pizzaSize;
  
      cout &lt;&lt; "Please choose 1 for deep dish, 2 for hand tossed, or 3\n";     cout &lt;&lt; " for pan pizza.\n";
      cin &gt;&gt; pizzaType;
  
      switch(pizzaType)
      {
          case 1: type = "deep dish";
          break;
          case 2: type = "hand tossed";
          break;
          case 3: type = "pan";
          break;
          default: cout &lt;&lt; "You entered an invalid choice. Please\n";              
                   cout &lt;&lt; " enter 1 for deep dish, 2 for hand\n";             
                   cout &lt;&lt; " tossed, or 3 for pan pizza.\n";
      }
  
      cout &lt;&lt; "Please choose 1 for small, 2 for medium, or 3 for\n"; 
      cout &lt;&lt; " large pizza.\n";
      cin &gt;&gt; pizzaSize;
  
      switch(pizzaSize)
      {
          case 1: size = "small";
          break;
          case 2: size = "medium";
          break;
          case 3: size = "large";
          break;
          default: cout &lt;&lt; "You entered an invalid choice. Please\n";
                   cout &lt;&lt; " enter 1 for small, 2 for medium, or\n";
                   cout &lt;&lt; " 3 for large pizza.\n";
      }
  
      cout &lt;&lt; "How many pepperoni servings on this pizza?\n";
      cin &gt;&gt; pepperoni;
  
      cout &lt;&lt; "How many cheese servings on this pizza?\n";
      cin &gt;&gt; cheese;
  }
  
  void pizza::outputDescription (string type, string size, int pepperoni, int cheese) 
  {
      cout &lt;&lt; "You ordered a " &lt;&lt; size &lt;&lt; &lt;&lt; type &lt;&lt; " pizza with \n"; 
      cout &lt;&lt; pepperoni &lt;&lt; " servings of pepperoni and "&lt;&lt; cheese &lt;&lt; endl;   
      cout &lt;&lt; "servings of cheese.\n";
  
  }
  
  double pizza::computePrice (string size, int pepperoni, int cheese)
  {
      double price;
  
      if (size = "small")
      {
          price = 10 + (2 * (pepperoni + cheese));
      }
  
      else if (size = "medium")
      {
          price = 14 + (2 * (pepperoni  + cheese));
      }
  
      else if (size = "large")
      {
          price = 17 + (2 * (pepperoni + cheese));
      }
  
      return price;
  }       
  </code></pre>