I am trying to initialize a 2D array, in which the type of each element is char. So far, I can only initialize this array in the follow way.
You can use for loop if you really want to.
char table[][] table = new char[row][col]; for(int i = 0; i < row * col ; ++i){ table[i/row][i % col] = char('a' + (i+1)); }
or do what bhesh said.