| static-members/alternative/prog.cc - A client of class Point. | Lecture 4 - slide 25 : 40 Program 7 |
#include <iostream>
#include "point.h"
using namespace std;
int main(){
Point p, // Default constructor use defaultPoint(): (5,7)
q(3,4); // (3,4)
cout << "p: " << p << endl; // (5,7)
cout << "q: " << q << endl; // (3,4)
Point::defaultPoint().move(1,1); // Move the default point relatively ...
Point t; // The default constructor uses
// the moved defaultPoint.
cout << "t: " << t << endl; // (6,8)
}