I have a NewTree class that's been defined in NewTree.h. When I make a new instance of NewTree in my main method, it throws an LNK 2019 error.
NewTree.h:
template <class T>
class NewTree
{
public:
treeNode<T> *current;
treeNode<T> *root;
NewTree();
~NewTree();
bool insert(T *data, treeNode<T> *parent);
treeNode<T> search(T *target);
};
Line to make new instance of NewTree:
NewTree<xml_node<>> *tree = new NewTree<xml_node<>>();
Why is Visual Studio giving me an LNK error?
Full Error:
main.obj : error LNK2019: unresolved external symbol "public: __thiscall NewTree<class rapidxml::xml_node<char> >::NewTree<class rapidxml::xml_node<char> >(void)" (??0?$NewTree@V?$xml_node@D@rapidxml@@@@QAE@XZ) referenced in function _main