First time posting so apologies for any mistakes.
I am following a tutorial as part of a school assignment (before anyone jumps on me for that, we are required to follow this tutorial and then turn it in without modifying anything) on Binary Search Trees. It is a playlist made by Paul Programming (
https://youtu.be/sf_9w653xdE) and while being older it seems to work just fine. Unfortunately, I am using Visual Studio as a course requirement and the tutorial does not. He uses a bash terminal in his, and so I am following along by creating the three files (BST.cpp, BST.h, and main.cpp) that he does in the Header and Source file locations. It seems that the IDE does not allow me to do so successfully as immediately I get this error whenever I click the Local Window Debugger button:
"Unable to start program
'G:\File Path\BinarySearchTreex64\Debug\BinarySearchTree.exe' (File Path is just a stand in for my file path on my USB, there is just several files I did not want to include as they are not really relevant.)
The system cannot find the file specified."
This is accompanied by the Output from the Build:
1 2 3 4 5 6
|
1
|
1>BST.obj : error LNK2005: "public: __cdecl BST::BST(void)" (??0BST@@QEAA@XZ) already defined in main.obj
1>BST.obj : error LNK2005: "public: void __cdecl BST::AddLeaf(int)" (?AddLeaf@BST@@QEAAXH@Z) already defined in main.obj
1>BST.obj : error LNK2005: "private: void __cdecl BST::AddLeafPrivate(int,struct BST::node *)" (?AddLeafPrivate@BST@@AEAAXHPEAUnode@1@@Z) already defined in main.obj
1>BST.obj : error LNK2005: "public: struct BST::node * __cdecl BST::CreateLeaf(int)" (?CreateLeaf@BST@@QEAAPEAUnode@1@H@Z) already defined in main.obj
1>BST.obj : error LNK2005: "public: void __cdecl BST::PrintInOrder(void)" (?PrintInOrder@BST@@QEAAXXZ) already defined in main.obj
1>BST.obj : error LNK2005: "private: void __cdecl BST::PrintInOrderPrivate(struct BST::node *)" (?PrintInOrderPrivate@BST@@AEAAXPEAUnode@1@@Z) already defined in main.obj |
I have searched through several posts about people having similar issues but could not find anything helpful and nothing regarding this specific tutorial. Any help would be greatly appreciated.