c:\documents and settings\administrator.rahulabbine44fd\desktop\cs340 proj1\cs340 proj1\binarytree.cpp(27) : error C2143: syntax error : missing ';' before 'BinaryTree<E>::getNode'
in cpp file
template <class E>
nodePtr BinaryTree<E>::getNode(E item){
nodePtr<E> temp = new nodePtr;
temp->data = item;
return nodePtr;
}
in headr file:
struct node;
typedef node *nodePtr;
struct node
{
E data;
nodePtr left;
nodePtr right;
};
I can't understand why the compiler wont accept this functio signature. please help.
Rahul.