title: C++ Undefined Symbol Error
body: <p>I am Getting undefined symbol error for all the integer and char values.Please Help me.
  The <code>int x</code> <code>y</code> and <code>z</code> are not working and also the char value of function.</p>
  
  <pre><code>#include &lt;iostream.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;math.h&gt;
  #include &lt;string.h&gt;
  
  class Calculator
  {
      public:
      int x;
      int y;
      int z;
      char function;
  
      void Calculate()
      {
        if(function=='+')
        {z=x+y;}
        else if(function=='-')
        {z=x-y;}
        else if(function=='*')
        {z=x*y;}
        else if(function=='/')
        {z=x/y;}
        else
        {cout&lt;&lt;"Wrong Function!!!";}
      }
  };
  
  void main()
  {
      clrscr();
      Calculator  working;
      cout&lt;&lt;"Welcome!"&lt;&lt;endl;
      cout&lt;&lt;"Enter your first number:"&lt;&lt;endl;
      cin&gt;&gt;x;
      cout&lt;&lt;"Enter your function:"&lt;&lt;endl;
      cin&gt;&gt;function;
      cout&lt;&lt;"Enter your second number:"&lt;&lt;endl;
      cin&gt;&gt;y;
      working.Calculate();
      cout&lt;&lt;"Your Result is:"&lt;&lt;z&lt;&lt;endl;
      getch();
  }
  </code></pre>