Question
In C++ Header (the top of the file): In C++ unsigned int movesStart // start of game moves record unsigned int movesLength // length of
In C++ Header (the top of the file): In C++ unsigned int movesStart // start of game moves record unsigned int movesLength // length of game moves record unsigned int playerXNameStart // start of name of player X unsigned int playerXNameLength // length of name of player X unsigned int playerONameStart // start of name of player O unsigned int playerONameLength // length of name of player O Body (after the header): Store the moves, each move can be a single char. For example, 192837465 means player X at 1, player Y at 9, player X at 2, player Y at 8... Store the name of player X as a string. Store the name of player Y as a string.
The user should be promoted to enter in the names for player X and player Y. Have the user play a game and then store the results to a file. Hint: The 164 file generator example is very similar to this problem, you might want to use the example code as a starting point. Begin by changing the header and record structs to match the problem description. Another Hint: The 164 file not making sense. Try using a struct to write the file as shown in Pr12-18.
|
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