Binary Tree Question

Hello, I am having a hard time passing an object into a binary tree. I keep receiving a long error message. Here is my code for main:

main.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 #include "BinaryTree.h"
#include "EmployeeInfo.h"
#include<iostream>
using namespace std;

int main(){
    
    EmployeeInfo emp;
    emp.setID(1021);
    emp.setName("John Williams");

    BinaryTree<EmployeeInfo> tree;
    

    tree.insertNode(emp);

}


To save space I did not post the rest of the code in the header file, but I can provide those if need be. I receiving the following errors when attempting to run the program:

Error 1 error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'EmployeeInfo'

Error 2 error C2784: 'bool std::operator <(const _Elem *,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const _Elem *' from 'EmployeeInfo'

and so on an so forth

Nevermind it works now. It was an issue with my operator overloading function in Employee idea.
Topic archived. No new replies allowed.