1) You've declared that initialization takes only a single dimensioned array. That's fine, if you're passing n*n as the second argument. Not clear since you didn't post the array declaration or the call to initializaion.
2) Your const n of 20 and the use of n as the argument to initialization is confusing because they're the same name.
3) Your rand calculation is off. If you want a number from 1-9, it should be: