Getting Input in Various Forms from Complex Input File

Apr 25, 2009 at 1:32am
Hi,

I am having a problem utilizing the various input commands to get the input I desire. My input file looks like this:

1
2
3
4
5
6
7
8
9
South Central
22 3

Players
3	smith, john	         freshman
7	williams, reggie       	junior
11	thomas, robert		senior
23	mcdonald, ronald       	freshman
27	rich, richie		junior


The goal is to just parse all this information in a useful way. How do I do this using the getline command? Thank you. I am clueless as to how to do this...
Last edited on Apr 25, 2009 at 1:37am
Apr 25, 2009 at 2:26am
Place special terminators between words or check for a certain amount of spaces or a tab.

getline(ifstream&, target_string);
Topic archived. No new replies allowed.