Main.cc: In function ‘int main()’: Main.cc:21:7: error: ‘mon’ was not declared in this scope if(mon[i]>0) ^~~ Main.cc:21:7: note: suggested alternative: ‘main’ if(mon[i]>0) ^~~ main Main.cc:38:7: error: ‘mon’ was not declared in this scope if(mon[i]==2) ^~~ Main.cc:38:7: note: suggested alternative: ‘main’ if(mon[i]==2) ^~~ main