title: unexpected return value from member function
body: <p>I am writing a program for quadratic equation but in the middle of the program there's an error such that it always returns <code>0</code></p>
  
  <p>Here is my code</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;math.h&gt;
  using namespace std;
  class quardaticequation {
  public:
      float a, b, c, sqr, descriminat;
  
      quardaticequation( float x, float y, float z ) {
          x = a;
          y = b;
          z = c;
      }
  
      //seems to always return 0 after use of contstructor
      float getDescriminant() {
          sqr = pow( b, 2.0 );
          sqr;
          descriminat = sqr - 4 * ( a * c);
          return descriminat;
      }
  };
  
  int main() {
      float first, second, third;
      cout &lt;&lt; "please enter the number in float format";
      cin &gt;&gt; first;
      cout &lt;&lt; "please enter the second  number in float format";
      cin &gt;&gt; second;
      cout &lt;&lt; "please enter  the third number in float format";
      cin &gt;&gt; third;
      quardaticequation q( first, second, third );
      cout &lt;&lt; q.getDescriminant(); //ALWAYS RETURNS 0
      return;
  }
  </code></pre>