#include <queue>
class Node{
public:
int x, y;
int f, g, h;
Node* parent = nullptr;
//constructor
Node(int x, int y){
this->x = x;
this->y = y;
}
//overload of <
booloperator < (Node& n){
if (f < n.f){
returntrue;
}
else{
returnfalse;
}
}
};
int main(){
Node start_node(10, 10);
std::priority_queue<Node> open_nodes;
open_nodes.push(start_node);
return 0;
}
the error i get is too big to be posted here, as the maximum allowed are 9000 chars, but it can be seen here: http://cpp.sh/2osh4
i'm trying to implement A* pathfinding algorithm.
thanks in advance!