Nov 12, 2012 at 12:01am UTC
why does this make [xsize-2][ysize] AND [xsize-1] TRUE?
I think because you equal line 38 to 1. Not sure about that but 1 is supposed to be true and 0 false in boolean language. Can help more if I knew what you were after.
Nov 12, 2012 at 12:09am UTC
its basically making a board
this is what i am aiming for :
this is what i am getting :
Nov 12, 2012 at 12:15am UTC
darkmaster that works fine, I'm having trouble changing two locations in the array to TRUE.
mouseisland[xsize] = 1; // <--- this part works fine
mouseisland[xsize-2][ysize] = 1; //why does this make [xsize-2][ysize] AND [xsize-1] TRUE?!?!?!?!!?!?!?
is giving me trouble not outputting the array.
Nov 12, 2012 at 12:26am UTC
i tried to compile this and the first thing i get is your main function has no type (int, void, ...). i dont know how you can run this.
next thing, your array size is defined at runtime. that also doesn't work
also is not the same as int xsize,ysize = 0;
Last edited on
Nov 12, 2012 at 12:28am UTC
Nov 12, 2012 at 12:29am UTC
everything compiles fine in codeblocks.
Nov 12, 2012 at 2:13am UTC
i am wondering why when i say
mouseisland = 1;
mouseisland also becomes 1???
Nov 12, 2012 at 2:36am UTC
@Darkmaster: TC is probably using an older compiler that accepts the nonstandard typeless main().
@TC: I'd therefore recommend either updating your compiler or switching to something more recent.
As for your question: mouseisland and  are the same location. Each row has only 9 elements (ranging from  to ), so  is one past the end of that row. That happens to overflow into the next row.