If necessary, create a new project named TryThis17 Project and save it in the Cpp7\Chap12 folder. Enter the C++ instructions shown earlier in Figure 12-22 into a source file named TryThis17.cpp. Change the filename in the first comment. Save and then run the program. As mentioned in the chapter, when you pass a two-dimensional array to a function, the first set of square brackets in its corresponding formal parameter can be empty. Remove the number 4 from the first formal parameter in the function prototype and function header. The main function will now need to pass two actual arguments to the displayArray function: the array and the number of rows (regions) in the array. Make the appropriate modifications to the displayArray function prototype, function header, and function call. Also modify the outer loop’s for clause in the displayArray function so it uses the number of rows passed to the function rather than the literal constant 4. (The answers to TRY THIS Exercises are located at the end of the chapter.)
REFEFENCE: FIGURE 12-22
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.