#include "Point.h" #include using std::cout; using std::endl; int main(int argc, char **argv) { Point p1(1, 2); const Point p2(4, 6); cout << "p1 is: (" << p1.x() << ", " << p1.y() << ")" << endl; cout << "p2 is: (" << p2.x() << ", " << p2.y() << ")" << endl; cout << "dist: " << p1.Distance(p2) << endl; p1.SetLocation(2, 1); // YES: non-const method on non-const instance // p2.SetLocation(6, 4); // NO: non-const method on const instance; return 0; }