Skip to content
Snippets Groups Projects
Commit c8e5436a authored by Ian Prins's avatar Ian Prins
Browse files

add default constructor to coords

parent df4e6537
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,11 @@ Coord::Coord(int x, int y)
, y(y)
{}
Coord::Coord()
: x(0)
, y(0)
{}
int& Coord::operator[](int dimension) {
switch (dimension) {
case 0:
......
......@@ -5,6 +5,7 @@
class Coord {
public:
Coord(int, int);
Coord():
int& operator[](int);
Coord operator+(const Coord&);
Coord operator-(const Coord&);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment