Why my variable class doesn't contain its value?
I'm trying to figure out why my variable "treeIndice" doesn't have its information to be used in other functions. Here is the code: https://code.sololearn.com/ch5A7RLYE5dq/#cpp In another words, I have a private variable called Tree<Index> treeIndice; (line 11), and, the function void ElectronicEmail::loadIndexToTree() (line 67) inserts some information to the treeIndice (line 108). Inside this function, "treeIndice" has its content, but when I try to use "treeIndice" inside the function void ElectronicEmail::findIndex(const std::string &fileName, int& id), treeIndice is empty (line 142). Why "treeIndice" is empty if in the other function ElectronicEmail::loadIndexToTree(), I inserted some content to the variable "treeIndice". I thought that inserting some content to that variable in a function, I would have its value ready to use to another functions. I don't know how to solve this, how to save its value and use it in another function. I tried to use setters and getters (29, 43) but it didn't work. Note: Tree class is a class made by me, I tried to overload the operator = but I couldn't make it work (maybe that's why my setters and getters doesn't work?, lines 151-193)