0

BinaryTree

Node

and my main is

#include<iostream>

template<typename T>
class Node;

//#include"Node.h"
#include"BinaryTree.h"


int main()
{
    BinaryTree<int> bt; 
    //bt.Insert(20);

    return 0;
}

So I have two .h files BinaryTree and Node and their respective .cpp files. I am using making a class variable of type Node in BinaryTree and I have declared BinaryTree and friend class in Node. When i run the program i get the following Linker errors -

Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "public: __thiscall BinaryTree::BinaryTree(void)" (??0?$BinaryTree@H@@QAE@XZ) referenced in function _main Practice C:\Users\u1017574\documents\visual studio 2015\Projects\Practice\Practice\main.obj 1

0 Answers0