okay, so if I want to move forward using a map,
If a map has :
Code:
std::map <key_type, value_type>
And a path object looks like this:
Code:
class Path{
public:
Path( Coord init, Coord term)
: initial( init ), terminal( term ){};
private:
Coord initial;
Coord terminal;
}:
Is there a way that "key_type" could contain both initial and terminal, since really that is the only way to distinguish one path from another, since many paths might share one coordinate, but no two paths can share both coordinates?
Something like:
Code:
std::map < string coordinate_pair, path >
where coordinate pair is a string like:
Code:
"0.0 0.0 0.0 50.367 99.889 72.440"
Is this a good approach or am I missing the point here?