Hey I just got this book Accelerated c++ and it seems pretty good, but I'm having one problem in chapter 4. When I compile my grading program in chapter 4. I can't get the final version to work. I believe I'm supposed to enter a students name followed by grades, but I don't know how to create a condition that makes the first while loop stop, so I can show I'm done entering names and grades. I included the files that I'm working with. If you have the book they're the exact same.
theashman88 36 Light Poster
Recommended Answers
Jump to PostThe read() function returns the stream, so you should be able to signal EOF to stop the first loop. On Linux it's a Ctrl+D key combination and on Windows it's Ctrl+Z.
Jump to PostOr pipe the input from a file.
All 8 Replies
Tom Gunn 1,164 Practically a Master Poster
theashman88 36 Light Poster
Tom Gunn 1,164 Practically a Master Poster
theashman88 commented: Quick help +1
Dave Sinkula 2,398 long time no c Team Colleague
Lerner 582 Nearly a Posting Maven
theashman88 36 Light Poster
theashman88 36 Light Poster
tux4life 2,072 Postaholic
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.