Question: This question involves checking for errors in an existing C + + program: I ' m making a suggested C + + program that reads

This question involves checking for errors in an existing C++ program:
I'm making a suggested C++ program that reads information from a txt file and lets the ship move in a binary plane.
map.txt The file consists of three parts, the first line is two numbers m and n, telling you that the whole map is a square matrix of mn. The second line begins with the phalanx itself, and after the phalanx itself, the last line is a monogram of WASD, which represents the direction of the ship's movement.
The whole program is up and running, but I found that there are some features that it should have been working with.
1: I want the R resource to be shown as X on the map after being passed by F representing the ship, and increase the ship's score by 20, which seems to be unfinished in my program.
2: I want enemy E to show an X on the map after being passed by F representing the ship, and reduce the ship's score by 10, which seems to be my program not complete. All the trajectories of my ship became "." Finish.
3: I want Boss B to compare the score of the two when it is in the same position as Ship F, and if the boss score is higher than the ship's score, it will show failure. Otherwise, it shows success.
Finally, I'll show you the image you need as follows: the program itself in the front, and the expected output in the back compared to mine.Please help me fix it,thanks!
This question involves checking for errors in an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!