Hi all, I am getting an error I do not understand. There was even a similar question asked on SO that I found, but the fix given is already in my code.
I am getting an error in this line:
ForestNode<NODETYPE> foo = new ForestNode<NODETYPE> ForestNode(bar);
that reads :
\project 4\forest.h|85|error: expected ',' or ';' before 'ForestNode'
My class forestnode is defindes as such:
template<typename NODETYPE> class Forest;
template<typename NODETYPE> class ForestNode
{
friend class Forest<NODETYPE>;
public:
ForestNode( const NODETYPE &);
~ForestNode();
NODETYPE getTag() const;
private:
NODETYPE tag;
ForestNode<NODETYPE> *leftChild;
ForestNode<NODETYPE> *sibling;
};
Any ideas?