I am very new to c++ and i am trying to define a Node class which holds information about another node, in this case the node will be the parent node so i can trace the most optimal route using an A* search.
so far i have tried (node.h file):
class node{
private:
int xCoord;
int yCoord;
int value;
int hueristicCost;
int pathCost;
class node parent;
public:
node(int xC, int yC, int value);
int getXPos();
int getYPos();
int getValue();
};
But this throws the compilation error:
node.h:10:13: error: field ‘parent’ has incomplete type
I am probably missing something stupidly obvious, but how would i go about completing this?