title: Calling Class Constructor in Member Function
body: <p>Here's a program, where I am trying to call the class constructor <code>multi::multi(int, int)</code>, in the function <code>void multi::multiply()</code>. The output is</p>
  <blockquote>
  <p>30</p>
  <p>30</p>
  </blockquote>
  <p>instead of expected</p>
  <blockquote>
  <p>30</p>
  <p>25</p>
  </blockquote>
  <p><em><strong>Why?</strong></em></p>
  <pre><code>#include &lt;iostream.h&gt;
  
  class multi{
      private:
          int a;
          int b;
      public:
          multi(int m, int n){
              a = m;
              b = n;
          }
  
          void multiply(){
              cout &lt;&lt; &quot;\n\n&quot; &lt;&lt; a*b;
              multi (5, 5);
              cout &lt;&lt; &quot;\n&quot; &lt;&lt; a*b;
          }
  };
  
  main(){
      multi x(5,6);
  
      x.multiply();
  return 0;
  }
  </code></pre>