_major += major;
_minor += minor;
+ /* Check for overflow */
+ if (_minor >= 10)
+ {
+ _major += 1;
+ _minor -= 10;
+ }
+
return *this;
}
return false;
}
-#include <iostream>
bool Position::operator> (const Position& rhs)
{
return false;
}
+std::ostream& operator<< (std::ostream& os, Position& rhs)
+{
+ os << "Position: " << rhs._major << "." << rhs._minor;
+ return os;
+}
+
/* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */