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