View Single Post
Old 09-5-2015, 11:48 PM   #27
sickufully
Sir Krisk
FFR Veteran
 
sickufully's Avatar
 
Join Date: Dec 2007
Location: Vic, Australia
Posts: 930
Default Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

Is this any closer to the answer? Also, am I supposed to keep the for-loops in the code and the if statements lie somewhere within the loop?
In (row == 0 || row == 20), the first 'row' is underlined as being undefined and same with col in it's statement.
Code:
	if (row == 0 || row == 20) //values in row 0 and 20 are set to WALL
	{
		tileMap[MAP_WIDTH][1] = WALL; //not sure whether I'm supposed to assign an Ascii Code or just set it to WALL
	}
	else
	{
		tileMap[MAP_HEIGHT][0] = EMPTY; //any other row set to EMPTY
	}
	if (col == 0 || col == 30) //values in col 0 and 30 are set to WALL
	{
		tileMap[MAP_HEIGHT][1] = WALL;
	}
	else
	{
		tileMap[MAP_HEIGHT][0] = EMPTY; //any other col set to EMPTY
	}
__________________

Last edited by sickufully; 09-5-2015 at 11:50 PM..
sickufully is offline   Reply With Quote