Question: C + + , Visual Studio. I've been getting four LNK 2 0 1 9 errors on my project. I've been trying to fix them

C++, Visual Studio. I've been getting four LNK2019 errors on my project. I've been trying to fix them thinking there is a problem between the header and the .cpp file of BinarySearchTree. However I've come to realize that the methods I'm calling in my driver, while they have the same name, are not compatible with my BinarySearchTree. I would appreciate it if using the attached photos you could provide a fix that makes my driver compatible with the BinarySearchTree. Due to formatting issues the includes do not appear. The driver includes iostream. Driver.cpp: #include "BinarySearchTree.h"
#include
bool isSameTree(const BinarySearchTree& tree1, const BinarySearchTree& tree2){
return tree1.equals(tree2);
}
int main(){
BinarySearchTree tree1, tree2, tree3, tree4;
//Adding elements to tree1
tree1.add("abc");
tree1.add("def");
tree1.add("ghi");
//Adding elements to tree2 in a different order
tree2.add("def");
tree2.add("abc");
tree2.add("ghi");
//Adding elements to tree3
tree3.add("abc");
tree3.add("def");
//Adding elements to tree4 with an extra element
tree4.add("def");
tree4.add("abc");
tree4.add("ghi");
//Output comparison results. Expected result for trees 1 and 2: true. Expected result for trees 3 and 4: false.
std::cout "Trees 1 and 2 are "(isSameTree(tree1, tree2)? "the same." : "not the same.") std::endl;
std::cout "Trees 3 and 4 are "(isSameTree(tree3, tree4)? "the same." : "not the same.") std::endl;
return 0;
}
C + + , Visual Studio. I've been getting four LNK

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!