What am I doing wrong here? I really can't tell.. I'm pretty lost
1 2 3 4 5 6 7 8 9 10 11 12 13
|
struct graph::path {
vertex* dest;
double cost;
bool operator<(const vertex& rhs) const {
return cost < rhs.cost;
}
bool operator>(const vertex& rhs) const {
return cost > rhs.cost;
}
path(vertex* d=0, double c=0.0) : dest(d), cost(c) {}
};
|
stl_function.h|218|error: no match for 'operator>' in '__x > __y'|
note: candidates are: bool graph::path::operator>(const graph::vertex&) const|
|
Last edited on
Shouldn't the overloads take references to constant graph::paths?
yeah...missed that. Thanks!