1. That is not legal C++. In C++, the size of an array must be defined using a compile-time constant.
2. Even if you're using some extension of C++ that allows variable-length arrays, you're defining the arrays before the user inputs the values. At line 6, m and n haven't had any values specified, so this is undefined behaviour.
If'n you want a variable sized 2D container the 'easiest' way to achieve this is using std::vector. Instantiating the 2D std::vectorafter getting the dimension(s) from the user.
Along with a couple of std::ostream::operator<< overloads displaying 1D and 2D std::vectors becomes as easy as displaying Plain Old Data like an int or double.