Main.cc: In function 'int main()':
Main.cc:16:10: error: 'p' was not declared in this scope
s+=(p*a[j]-'0');
^
Main.cc:19:5: error: 'p' was not declared in this scope
p=2;
^
Main.cc:9:12: warning: unused variable 'q' [-Wunused-variable]
double q=1;
^