street_lamps.cpp: In function 'int main()':
street_lamps.cpp:13:24: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=]
scanf(" %s", c[0] + 1);
~~~~~~~~^
street_lamps.cpp:18:11: error: invalid types 'char[int]' for array subscript
c[i][j] = c[i - 1][j];
^
street_lamps.cpp:18:25: error: invalid types 'char[int]' for array subscript
c[i][j] = c[i - 1][j];
^
street_lamps.cpp:28:16: error: invalid types 'char[int]' for array subscript
if(c[j][k] == '0')
^
street_lamps.cpp:37:14: error: invalid types 'char[int]' for array subscript
if(c[i][w] == '0') c[i][w] = '1';
^
street_lamps.cpp:37:30: error: invalid types 'char[int]' for array subscript
if(c[i][w] == '0') c[i][w] = '1';
^
street_lamps.cpp:38:16: error: invalid types 'char[int]' for array subscript
else c[i][w] = '0';
^
street_lamps.cpp:11:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &q);
~~~~~^~~~~~~~~~~~~~~~
street_lamps.cpp:13:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %s", c[0] + 1);
~~~~~^~~~~~~~~~~~~~~~~
street_lamps.cpp:20:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %s", comm);
~~~~~^~~~~~~~~~~~~
street_lamps.cpp:23:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
~~~~~^~~~~~~~~~~~~~~~
street_lamps.cpp:35:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &w);
~~~~~^~~~~~~~~~
street_lamps.cpp:43:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %s", c + 1);
~~~~~^~~~~~~~~~~~~~
street_lamps.cpp:48:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %s", comm);
~~~~~^~~~~~~~~~~~~
street_lamps.cpp:51:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
~~~~~^~~~~~~~~~~~~~~~
street_lamps.cpp:58:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &w);
~~~~~^~~~~~~~~~