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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -