cpp2html 0.1-alpha © 2002 Andrea Leofreddi. To get the source click here

// esercizio 3: Point2D
#include <iostream>
#include "es3.h"

using namespace std;

void dump(Point2D &);

void main() {
	Point2D a(1.0f, 1.0f);
	Point2D b;
	Point2D c;

	b = a;
	c = b;

	b++;
	c--;

	cout << "a is "; dump(a);
	cout << "b is "; dump(b);
	cout << "c is "; dump(c);

	c = a + b;

	cout << "a is "; dump(a);
	cout << "b is "; dump(b);
	cout << "c is "; dump(c);
}

void dump(Point2D &what) {
	cout << what.get_x() << ":" << what.get_y() << endl;
}