View Single Post
Old 09-5-2015, 08:27 AM   #19
Xayphon
sausage
FFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
Xayphon's Avatar
 
Join Date: Nov 2008
Location: Germany
Posts: 1,630
Default Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

I assume you need to have something like this as a result? (All last and first col and row values need to become a WALL)



In order to achieve that, you need to think about what conditions need to be met in order for a WALL to be initialised into the Array.

During the for-loop, you need to check whether the row value is at the first or last row OR col is at the first or last value. If one of these is true, put a WALL instead of an EMPTY into the Array. If none of these are true, an EMPTY will be put into the array.

It might sound confusing what I just said, but translate what I just tried to broadly describe into C++ and it should be solved, it's hard to describe conditions when you yourself are going to sound like a confusing computer program..

Ask away if you need anymore tips for this

edit: I'm actually not sure which values your docent wants to see within the array. I went with 0 and 1 because it seemed easy, but WALL does not have a specified value in your code as far as I can see, so you might want ot add WALL = 1 or something

Last edited by Xayphon; 09-5-2015 at 10:34 AM..
Xayphon is offline   Reply With Quote