Question
In C++ using File Processing to write a program that allows you to write stats of a monster and save it to a file. (in
In C++ using File Processing to write a program that allows you to write stats of a monster and save it to a file. (in text format) (Things like Name, Hit Points, Minimum damage and Maximum damage.) Allows you to open the file and read the stats of the monster. (Print what was read onto the screen.) Allow the user to decide what file to open (just type in the filename)
Allow the program to load the stats of two monsters and let them battle it out.
1. Create monster stats
2. Ask the user if creating or loading (ask the user the file name)
3a. If loading open file for reading read stats in from file print stats to screen
3b. If creating open file for writing write stats to file - make sure to leave spaces or returns between variables, so all values do not get smooshed together
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started