c++ - Replace zero in 2D array with blank space -
if have 2d array has values in indices , has 0 in other. how can convert 0 blank space. tried a[i][j] = ' '
, prints ascii value 32, guess.
for (int i=0;i<r;i++) (int j=0;j<c;j++) if (a[i][j]==' ') cout << (char)a[i][j]; else cout << a[i][j];
Comments
Post a Comment