I know how to use getline, but it returns the whole paragraph. I need it to JUST grab the teamname, but since that variable changes every time, I'm not sure how to do that. Here's my code:
FIXED - It runs into this error at line 30: "error: variable 'std::stringstream iss' has initializer but incomplete type"
Unfortunately I haven't been able to find anything that makes sense to me so I can fix this. It appears that iss is not a function and I need to declare it somehow, somewhere? EDIT - I added <sstream> and now it compiles
I've tried cout << test << endl; and cout << teamname << endl; and no matter how I do it, it prints a lot of information I don't need or want. The teamname output is just a single, organized column compared to the test output. Does anyone know of a webpage I should be looking at to help me? I can't seem to find anything relevant to my problem anywhere...
EDIT: I believe the problem is that it prints the 7th word of every line, based on comparing my output results to my original text file. The files I am reading from are emails converted to text files and I can provide an example if anyone thinks it would be helpful.