First allocate memory · int** mat = new int*[rows]; · for (int i = 0; i < rows; ++i) · mat[i] = new int[cols]; · Then initialize it to NULL value · memset(mat, 0, ...
確定! 回上一頁