Working on a small ungraded assignment for my class and have stumbled upon a problem. We are suppose to be using a facilitator input function (see below) to read from a .txt file. The .txt file is a list of the states and includes Abbreviation (space) Name (Tab) Capital (Tab) Population... The issue I am running in to is with the reading of the tab before and after the Capital. I have the error with the first '\t' token, error C2679. Any help appreciated, thank you.
Ah okay, I was unsure if a state name like Rhode Island would cause an issue and the program would read Rhode as the m_name and Island as the m_capital.
Edit: Moved along in the project and this problem is coming up now, while I create a state object and fin >> state to display the information, the program is not recognizing the tabs before and after the m_capital. How would I fix this?
Code:
This is the loop were given:
while (fin >> state)
{
state.display(cout);
cout << endl;
}
Here are my input and output facilitator functions: