Main.cc: In function 'int main()': Main.cc:11:15: error: 'i' was not declared in this scope s=s+a[1]*(i+m); ^