Main.cc: In function ‘int main()’: Main.cc:11:16: error: ‘i’ was not declared in this scope cin>>t[i];} ^ Main.cc:13:14: error: ‘i’ was not declared in this scope x+=s[i]*t[i]; ^