tobmp.cpp (410B)
1 const int ROWS = 716; 2 const int COLS = 1522; 3 4 #include "intarray2bmp.hpp" 5 6 bool a[ROWS][COLS]; 7 8 int main(int argc, char *args[]) { 9 10 scanf("%*d%*d"); 11 12 for (int r = 0; r < ROWS; r++) 13 for (int c = 0; c < COLS; c++) 14 { 15 char C; 16 do 17 C = getchar(); 18 while (C != '#' && C != '.'); 19 a[r][c] = (C == '#'); 20 } 21 22 return intarray2bmp::boolarray2bmp(args[1], a); 23 24 }