I am overloadin the = Operator so I can assign an Obj to another Obj.
he Errors are:
Error 1 error C2556: 'void BSTree::operator =(const BSTree &)' : overloaded function differs only by return type from 'BSTree &BSTree::operator =(const BSTree &)' c:\users\phil\desktop\c++\cs230\lab5\lab5\lab5\bstree.cpp 157
Error 2 error C2040: 'BSTree::operator =' : 'void (const BSTree &)' differs in levels of indirection from 'BSTree &(const BSTree &)' c:\users\phil\desktop\c++\cs230\lab5\lab5\lab5\bstree.cpp 157
Error 3 error C2662: 'BSTree::GetRoot' : cannot convert 'this' pointer from 'const BSTree' to 'BSTree &' c:\users\phil\desktop\c++\cs230\lab5\lab5\lab5\bstree.cpp 160
Error 4 error C2660: 'BSTree::FreeTree' : function does not take 1 arguments c:\users\phil\desktop\c++\cs230\lab5\lab5\lab5\bstree.cpp 160
Error 5 error C2662: 'BSTree::GetRoot' : cannot convert 'this' pointer from 'const BSTree' to 'BSTree &' c:\users\phil\desktop\c++\cs230\lab5\lab5\lab5\bstree.cpp 161
Error 6 error C2664: 'BSTree::CopyTree' : cannot convert parameter 1 from 'TreeNode *' to 'TreeNode *&' c:\users\phil\desktop\c++\cs230\lab5\lab5\lab5\bstree.cpp 161

I dont know where I am going wrong. any help is cool

>>I dont know where I am going wrong. any help is cool

The first error tells you what is wrong. You can't have two functions that differ only by their return type. Overloaded functions must have different parameters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.