Hi, i need help creating a copy constructor.
i have a class called CElist (and another called CEmployee)
and it contains methods like this one:
bool CElist::getFirst(CEmployee& e)
//do some stuff
//sets e to the first employee and returns true
//returns false if it cant
my problem is with the copy constructor:
CElist::CElist(const CElist& eList)
eList.getFirst(newEmp); //this is the error part! --> cannot convert 'this' pointer from 'const class CElist' to 'class CElist &'
//do other stuff
i dont think im changing the eList right? Right now the only solution i can think of is to create a different function that returns the first CEmployee, not a bool...
>< thanks for any help :)