Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part A: The World.h Header [15% test program] In Part A, you will define types and constants related to the world. Put them in a
Part A: The World.h Header [15% test program] In Part A, you will define types and constants related to the world. Put them in a file named World.h. Throughout this course, make sure that you use exactly the specified file names, which are case sensitive. Here, w is uppercase and the remaining letters are lowercase. Perform the following steps: 1. As the first line in World.h and every other header (.h) file for the rest of the course, put the following line: #pragma once This line tells the C++ compiler to only compile this file once even if it happens to be #included multiple times. 1A. Add a line that #includes the string library. Also put "using namespace std;". 2. In World.h, define ROW_COUNT and COLUMN_COUNT as int constants with the respective values 6 and 9. 3. Use a typedef command to define the NodeValue type to be the same as unsigned int. Hint: Do not put const in the typedef. 4. Define INACCESSIBLE, START_MESSAGE, END_MESSAGE, DEATH_NODE, START_NODE, and VICTORY_NODE as NodeValue constants with the respective values 0, 1, 2, 3, 4, and 5. 5. Use a typedef command to define the World type to be a 2D array of NodeValues with dimensions ROW COUNT by COLUMN_COUNT
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