Question: I need help with creating a C++ treasure hunt console game. I think I understand the elements that it needs like the board and array,

I need help with creating a C++ treasure hunt console game. I think I understand the elements that it needs like the board and array, but I am confused on the actual code structure. Like what do I put above main, do I put the board code before or after the array. It is structure questions like these that conduse me when coding. Here is my instructions:

Problem Statement: You are designing a game that has five treasure chests located on a map and only the fifth chest contains the token required to level up. You want to track which chest the player has found and opened. Create a Boolean array that stores five elements, and initialize them all to false. Next, ask the user to input which chest he or she just found (15). Using the input, use pointers to update the array to true for the chest just found. Then print out to the player if he or she levels up based on the Boolean of the fifth chest.

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 Databases Questions!