how do i input data from a space delimited text file?

there are 7 days of the week in the file, and i need to input them, but not as a line but as separate units...after that first line, then there will be seven more lines with data that will represent the seven days, and i have to separate each line into the day of the week that it belongs to
for example
Monday
...Line 2
Tuesday
...Line 3
Wednesday
...Line 4

and so forth

can someone suggest how to separate the data?
thanks in advance
If I understand your problem then you are having an issue with output formatting not input. First question:

if(Is your program reading the data in the way you want it to?)
{
Then your issue is with formatting output. Simply write something like cout << Day << "\nLine 2\n" << Day << "\nLine 3\n" << Day << "\nLine 4\n";
}

else
{What way is your data being read in that is incorrect?}

How do you like my post format :p?
okay, i want it to read the days that are in the same line individually, then read the line that follows, then read the other day, and the line that follows after the second, etc....however, i'm not quite sure how to do so
Topic archived. No new replies allowed.