Because there is no value set in int a,b
, int ArrayA[a][b]
doesn’t do whatever you expected it to do.
Give a
and b
some value, like int a=2, b=2
or something, then it will work.
1
solved c++ Multidimensional array second row overwriting the first row