Main.cc: In function 'int main()': Main.cc:19:18: error: 'ent' was not declared in this scope cnt=a[i]+ent; ^