if and array checking
Moderators - Reputation: 10633
Posted 16 December 2012 - 11:04 PM
It sounds like your array might be declared as bool *bricks or you are doing something like if(bricks==true), in which case you are comparing a bool (true) with a pointer to bool.
Members - Reputation: 1463
Posted 17 December 2012 - 02:57 AM
What it actually does is discard the value of 2 and use 4 as the array subscript. As a result, bricks[2,4] evaluates to bricks, which is of type bool, thus the incompatibility error.
Edited by rnlf, 17 December 2012 - 02:57 AM.