Main.cc: In function 'int main()': Main.cc:11:3: error: 'tpx' was not declared in this scope tpx[p]++; ^ Main.cc:15:21: error: 'tpx' was not declared in this scope for(int k=1;k<=tpx[j];k++) ^