Category ID Description
1 Pay Check
9 College Fund
10 Transfer From Savings
and place the category id in one variable, and the entire description in another? Preferably, I'd like to have a class whose attributes are categoryID and Description, and set their values according to the file.
One way would be to operator<< in the first number of every line into an int, and then std::getline() the rest of the line. operator<<() is delimited by spaces, but std::getline() can be delimited by whatever you want, default delimiter is newline '\n'. http://en.cppreference.com/w/cpp/string/basic_string/getline