maps, iterators, and complex structs - STL errors
- by Austin Hyde
So, I have two structs:
struct coordinate {
float x;
float y;
}
struct person {
int id;
coordinate location;
}
and a function operating on coordinates:
float distance(const coordinate& c1, const coordinate& c2);
In my main method, I have the following code:
map<int,person> people;
// populate people…