title: C++: Calling private function in a class from the public section of that class
body: <p>If I were to make a class and place several functions into the private section, how would I call the functions from the public section of the same class?
  Example:</p>
  
  <pre><code>class calculator{
  public: //What would go here
  
  private:
      float calculate(float x, char y, float z){
          float answer;
  
          switch (y){
  
            case '+':
              answer = x + z;
              break;
  
            case '-':
              answer = x - z;
              break;
  
            case '/':
              answer = x / z;
              break;
  
            case '*':
              answer = x * z;
              break;
  
            default:
              return(0);
          }
          cout &lt;&lt;"= "; return answer;
      }
  
      void main(){
          float num1;
          float num2;
          char aOp;
          system("CLS");
          cout &lt;&lt; "&gt;&gt; "; cin &gt;&gt; num1 &gt;&gt; aOp &gt;&gt; num2;
          cout &lt;&lt; calculate(num1, aOp, num2) &lt;&lt; endl &lt;&lt; endl;
      }
  };
  </code></pre>