Main.cc: In function 'int main()': Main.cc:9:6: error: 'pi' was not declared in this scope if(pi==-1) break; ^ Main.cc:10:6: error: 'pi' was not declared in this scope if(pi>0&&p1<4) a[p1]++; ^