Go Back   Flash Flash Revolution: Community Forums > Search Forums

Showing results 1 to 6 of 6
Search took 0.00 seconds.
Search: Posts Made By: AutotelicBrown
Forum: Homework & Help 09-6-2015, 04:48 AM
Replies: 30
Views: 5,965
Posted By AutotelicBrown
Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

You got it slightly backwards, here is what should've been (at this point I don't think there is a problem giving it solved). Note the comments after the code explaining what is being done.


1 ...
Forum: Homework & Help 09-5-2015, 11:57 PM
Replies: 30
Views: 5,965
Posted By AutotelicBrown
Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

Yeah, those should be inside the for loop, and note that you should have in all of them something of the form:

tileMap[row][col] = WALL;


or:


tileMap[row][col] = EMPTY;
Forum: Homework & Help 09-5-2015, 11:32 PM
Replies: 30
Views: 5,965
Posted By AutotelicBrown
Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

Also, if is not a loop, when you have something like:


if (unsigned int row = 0 && 20) //values in row 0 and 20 are set to WALL
{
tileMap[MAP_WIDTH][row] = WALL; //not sure whether I'm...
Forum: Homework & Help 09-5-2015, 11:23 PM
Replies: 30
Views: 5,965
Posted By AutotelicBrown
Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

Just a reminder that the equality operator is '==' and not '='. You should have something like:

if (row == 0 || row == 20)
Forum: Homework & Help 09-5-2015, 01:22 PM
Replies: 30
Views: 5,965
Posted By AutotelicBrown
Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

By default the enum assigns numeric values sequencially after any explicit definitions, so WALL is going to be 1. In any case the assignment should be in the form of: "tileMap[row][col] = WALL;".
Forum: Homework & Help 08-31-2015, 10:29 PM
Replies: 30
Views: 5,965
Posted By AutotelicBrown
Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

A non-static variable is (ignoring compiler optimizations) always allocated (including calling it's constructor which may be a costy operation for some types) and deallocated from stack memory during...
Showing results 1 to 6 of 6

 
Forum Jump


All times are GMT -5. The time now is 03:07 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution