I have a file first line contains three int's.
(These are the vari's I assigned)
numStudents
numScores
total
--I AM CONFUSED HERE-

{
in >> numStudents >> numScores >> total;
}
- Here I am mentally not getting it. I need to read the line in the file as a (??) str or separate ints.
I know the data format in the file will always be (for example) :
5 6 600
1542 95 91 92 88 100 90
9328 91 85 88 89 82 91
3902 79 82 85 84 80 81
5801 88 84 86 89 93 92
6829 80 78 85 73 76 79
SO 5 6 600 are the vari's I named above. I donot see how to read 3 separate values, store them but not add them.
No I am not a good programmer.
Any input is helpful.
Thx.

Recommended Answers

All 2 Replies

I'm confused, too.

Confusion #1: Why don't new posters ever read the post Read Me: Read This Before Posting? Isn't the title explicit enough?

Confusion #2: No idea what your problem is. I have no idea what "I donot see how to read 3 separate values, store them but not add them" means. It can't be something as simple as just don't add them, I assume.

Thanks,
Happy geek will delete me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.