Main.cc: In function ‘int j(int)’: Main.cc:7:9: error: ‘MONEY’ was not declared in this scope MONEY+=A[i] ^~~~~ Main.cc:7:16: error: ‘A’ was not declared in this scope MONEY+=A[i] ^ Main.cc:5:6: warning: unused variable ‘money’ [-Wunused-variable] int money=0,month=0,d,i; ^~~~~ Main.cc:5:22: warning: unused variable ‘d’ [-Wunused-variable] int money=0,month=0,d,i; ^