title: unable to call getter method
body: <p>I am trying to get the value of x and y after the user input,
  placed the values in a consturctor,
  and using <code>getX()</code> and <code>getY()</code> method in <code>Point.cpp</code> to do some calculations but the thing is, it always returns <code>X:0 Y:0</code> and I have no idea why. My code is below</p>
  
  <p>Point.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Point.h"
  using namespace std;
  
       Point::Point(int x,int y)  {
          setX(x);
          setY(y);
       } 
  
       int Point::getX() {
         return x;
       }
  
       int Point::getY() {
         return y;
       }
  
       void Point::setX(int x) {
         this-&gt;x = x;
       }
  
       void Point::setY(int y) {
        this-&gt;y = y;
      } 
  
      void Point::someMethods() {
         x = getX();
         y = getY();
         cout &lt;&lt; "X:" &lt;&lt; x &lt;&lt; "Y:" &lt;&lt; y;
         // do some methods here after getting the x and y cords;
      }
  </code></pre>
  
  <p>Point.h</p>
  
  <pre><code> #ifndef Point_Point_h
   #define Point_Point_h
  
  class Point {
    private:
           int x,y;
    public : 
  
         Point() {
         x = 0;
         y = 0;
         }//default consrructor
  
        Point(int x,int y);
        int getX();
        int getY();
        void setX(int x);
        void setY(int y);
        void someMethods();
   };    
  
  #endif
  </code></pre>