I find that it compiles fine, after you take the excess [numberOfNodes .
I would think that removing the const keyword from your parameter list would clear the error you're getting.
FYI, you're not declaring or allocating a 2D array. bool* matrix; will be a 1D array only.
(using VC++ 2005)