prog.cpp:69:9: error: 'Point* PointPair::p1' conflicts with a previous declaration
Point* p1;
^
prog.cpp:48:10: note: previous declaration 'Point* PointPair::p1()'
Point * p1()
^
prog.cpp:70:9: error: 'Point* PointPair::p2' conflicts with a previous declaration
Point* p2;
^
prog.cpp:52:10: note: previous declaration 'Point* PointPair::p2()'
Point * p2()
^
prog.cpp: In constructor 'PointPair::PointPair()':
prog.cpp:44:6: error: invalid use of member function (did you forget the '()' ?)
p1 = 0;
^
prog.cpp:45:6: error: invalid use of member function (did you forget the '()' ?)
p2 = 0;
^
prog.cpp: In member function 'Point* PointPair::p1()':
prog.cpp:50:10: error: cannot convert 'PointPair::p1' from type 'Point* (PointPair::)()' to type 'Point*'
return p1;
^
prog.cpp: In member function 'Point* PointPair::p2()':
prog.cpp:54:10: error: cannot convert 'PointPair::p2' from type 'Point* (PointPair::)()' to type 'Point*'
return p2;
^
prog.cpp: In member function 'void PointPair::setP1(Point*)':
prog.cpp:58:6: error: invalid use of member function (did you forget the '()' ?)
p1 = p;
^
prog.cpp: In member function 'void PointPair::setP2(Point*)':
prog.cpp:62:6: error: invalid use of member function (did you forget the '()' ?)
p2 = p;
^