Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualrnlf

Posted 17 December 2012 - 02:57 AM

To elaborate a bit: bricks[2,4] is still valid C++, take a look at http://en.wikipedia.org/wiki/Comma_operator.

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[4], which is of type bool[5], thus the incompatibility error.

#1rnlf

Posted 17 December 2012 - 02:57 AM

To elaborate a bit: bricks[2,4] is still valid C++, take a look at http://en.wikipedia.org/wiki/Comma_operator.

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[4], which is of type bool[5], thus the incompatibility error.

PARTNERS