Warning 1 warning C4717: 'getx' : recursive on all control paths, function will cause runtime stack overflow
and here is my code I put a comment around the part that is giving me problems!
Can anyone help me please?!?!?!?!
class point { public: point(); point(int xx, int yy); friend double distance(point p1, point p2); int getx(); int gety(); double dist; double xnum, ynum, total; private: int x, y; }; point::point() { x = 1; y = 1; } point::point(int xx, int yy) { x = xx; y = yy; } //********************This is the part that is giving me problems************************ double distance(point p1, point p2) { double dist; double xnum, ynum, total; xnum = (p2.getx() - p1.getx()); xnum = pow (xnum, 2.0); ynum = (p2.gety() - p1.gety()); ynum = pow (ynum, 2.0); total = xnum + ynum; dist = sqrt (total); return dist; } int getx() { return getx(); } int gety() { return gety(); //************************************************************************ }