Main.cc: In function 'int main()': Main.cc:10:42: error: 'd' was not declared in this scope scanf("%1d%1d%1d%1d%1d%1d",&a,&b,&c,&d,&e,&f); ^