I am trying to set initializes for my constructor but I am getting an error saying that nullptr and NULL are both not in scope. I have looked around and saw that I needed to add #include cstddef but I am still getting the same error.
template<class ItemType>
class BinaryNode
{
private:
ItemType item; // Data portion
BinaryNode<ItemType> * leftChildPtr; // Pointer to left child
BinaryNode<ItemType> * rightChildPtr; // Pointer to right child
public:
BinaryNode();
};
#include "BinaryNode.h"
#include <cstddef>
template<class ItemType>
BinaryNode<ItemType>::BinaryNode() : leftChildPtr(nullptr) , rightChildPtr(nullptr)
{
} // end Constructor