friends/point-with-operator-friend/prog.cc - The program that uses the operator - nothing new here. | Lecture 4 - slide 36 : 40 Program 3 |
// Sample use - not really interesting #include <iostream> #include "point.h" using namespace std; int main(){ Point p(1.0, 2.0), q(3.0, 4.0); p.move(1,1); q.move(1,1); cout << "Point p: " << p << endl; // (2,3) cout << "Point q: " << q << endl; // (4,5) }