00001 #include <iostream>
00002
00003
00004 #include <cstdlib>
00005 using namespace std;
00006
00007 #ifndef COORD_H
00008 #define COORD_H
00009
00011 class Coord {
00012
00013 friend ostream& operator<< (ostream&, const Coord &);
00014
00015 public:
00017 Coord(int n = 0, int e = 0);
00018
00019 int getN() const { return n; }
00020 int getE() const { return e; }
00021 void setCoord(int, int);
00022
00024 int distance(const Coord&) const;
00025 bool operator==(const Coord&) const;
00026 bool operator!=( const Coord& right ) const { return !(*this == right); }
00027 Coord operator+(const Coord&) const;
00028
00029 private:
00030 int n, e;
00031 };
00032 #endif