Main.cc: In function 'int main()': Main.cc:24:23: error: invalid conversion from 'int*' to 'int' [-fpermissive] s = s + a[i]; ^