=
is the structural equality operator. To set an array element you need to use <-
.
Also, you should almost never use ==
because it tests for physical equality, i.e. that references point to the same address in memory. For comparing bool
s it doesn’t strictly matter, because they’re not pointers, but you should get into the habit of using =
instead to avoid surprises in the future.
0
solved Contagion program, Matrices and Syntax issue