Main.cc: In function ‘void check(int, int, int, int)’:
Main.cc:16:9: error: invalid types ‘int[int]’ for array subscript
if(a[i] == 1){
^
Main.cc:25:8: error: ‘i’ was not declared in this scope
if(a[i] == 0){
^
Main.cc: In function ‘int main()’:
Main.cc:39:18: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
check(a,n,x,y);
^
Main.cc:13:6: note: initializing argument 1 of ‘void check(int, int, int, int)’
void check (int a, int n, int x, int y){
^~~~~
Main.cc: In function ‘void nhapmang(int*, int)’:
Main.cc:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:37:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &n, &x, &y);
~~~~~^~~~~~~~~~~~~~~~~~~~~~