I have a simple program. A Random Number Generator makes a number, from 1,000, and the user guesses it, and continues to guess it until they get it right, and it records the guess taken. I want to know how I could save the amount of guesses in a high score type way, how much experience I would need to do that, and if I could do it by saving the lowest amount of guesses. Yeah, I'm a newb.
Also, I'm using Dev-C++ for my compiler.
How much experience with C++ would you need to save High Scores? Also, can you help me?
I learned how to do that in first semester college so it shouldn't be that difficult.
I would go here:
http://www.google.com/search?ie=UTF-8%26amp;oe...
I searched in google. what you are looking for is a header at the top called fstream. Take a read...it is very interesting!
Reply:The data would have to be stored externally, since the data gets trashed when the program exits.
I assume the guessing function is a loop right?
The only thing you need to do is output the results to a file somewhere, and then retrieve it again when the program loads again.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment