Main.cc: In function 'int main()': Main.cc:26:16: error: 's' was not declared in this scope if(nx(s)){ ^ Main.cc:22:16: warning: unused variable 'f' [-Wunused-variable] int n,sum=0,f=0; ^