Main.cc: In function ‘int main()’: Main.cc:4:22: error: ‘n’ was not declared in this scope while (scanf("%d", &n) != EOF) { ^