1 | initial version |
Static arrays need the size for their construction at compile time. If you want to have the size controlled at run-time, you need to either create the mat-array via new
or use std::vector (I'd prefer the latter one, since when using new
you'll also need to call delete[]
and it also prevents you from writing at non existent memory).