How do I create a node class with a pointer to a parent node that I can make null
<p>Never mind I am an idiot </p>

<p>My current node class </p>

<pre><code>class node
{
public:
    int xCoord;   // current position
    int yCoord;
    int gCost;     //Cost to travel to node
    int hCost;
    int parentX;  // parent coordinates
    int parentY;
    node* parentNode;

    node(int x, int y, int g , int h, int pX, int pY, node* parent) 
        {xCoord=x; yCoord = y; gCost = g; hCost = h; parentX = pX; parentY = pY;   parentNode = parent;}

    int getxCoord() const {return xCoord;}
    int getyCoord() const {return yCoord;}
    int getgCost() const {return gCost;}
    int getfCost() const {return hCost;}
    int getparentX() const {return parentX;}
    int getparentY() const {return parentY;}
</code></pre>

<p>I want to create a node like this </p>

<pre><code>node* startNode = new node(startX, startY, 0, 0, 0, 0, null)
</code></pre>

<p>However it is giving me an identifier 'null' is undefined error</p>
