|
hi
im a uni student and im having a whole lot of trouble reading in from a text file. i have recently completed an assignment where every word was only seperated by a single white space. i therefore was able to use getline(inputfile, idvalue, ' '); or getline(inputfile, score1, ' '); . this time they are seperated by many diffrent amounts of space. the file shown below is a sample of what i must read in. it represents a student id followed by 4 differed scores each student student has received. thank you to any one that can help
s9000002 9 7 10 135
s9000004 6 9 6 150
s7000001 10 10 10 175
s8000002 9 7 10 135
s8000004 6 9 6 150
s8000001 10 10 10 175
s7000002 9 7 10 135
s7000004 6 9 6 150
s9000001 10 10 10 175
s0000002 9 7 10 135
s0000004 6 9 6 150
s0000001 10 10 10 170
<Added>
s9000002 9 7 10 135
s9000004 6 9 6 150
s7000001 10 10 10 175
s8000002 9 7 10 135
s8000004 6 9 6 150
s8000001 10 10 10 175
s7000002 9 7 10 135
s7000004 6 9 6 150
s9000001 10 10 10 175
s0000002 9 7 10 135
s0000004 6 9 6 150
s0000001 10 10 10 170
|
|
|
|
|
|
|
// |