Main.cc: In function 'int main()': Main.cc:10:8: error: 'a' was not declared in this scope cin>>a[i]; ^ Main.cc:16:7: error: 'a' was not declared in this scope if (a[i] < minx){ ^ Main.cc:23:7: error: 'a' was not declared in this scope if (a[i] != minx && a[i] < secx){ ^