This is my header file. Im trying to overload the istream operator and use ifstream in my main function to read in a text file with structured data (rows and columns). I am getting the error "[Error] no match for 'operator>>' (operand types are 'std::istringstream {aka std::basic_istringstream<char>}' and 'std::string {aka std::basic_string<char>}')
I commented where I am getting the error.
My main function is basically empty so far besides The class and object.
Take a close look at what you are trying to do. iss >> employee.get_name();. You are reading from "iss" into a function that returns "name" from the class's private variables. This is not going to work.
I have no idea what "line" or "iss" contains at this point which means I can only guess at how to read from "iss" for what you need. My first thought would be std::getline(iss, name);, but "getline" may nee a third parameter to work properly. It would depend on what "line" contains.