prog.cpp: In function ‘int readInt()’:
prog.cpp:2:15: error: ‘getchar’ was not declared in this scope
int x=0,c=getchar(),neg=0;
^~~~~~~
prog.cpp:2:15: note: ‘getchar’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
+#include <cstdio>
inline int readInt(){
int x=0,c=getchar(),neg=0;
^~~~~~~
prog.cpp:4:16: error: ‘neg’ was not declared in this scope
if(c=='-') neg=1,c=getchar();
^~~
prog.cpp:6:12: error: ‘neg’ was not declared in this scope
return neg?-x:x;
^~~
prog.cpp: In function ‘void writeInt(int, char)’:
prog.cpp:10:9: error: ‘putchar’ was not declared in this scope
putchar('0');
^~~~~~~
prog.cpp:10:9: note: suggested alternative: ‘char’
putchar('0');
^~~~~~~
char
prog.cpp:14:14: error: ‘putchar’ was not declared in this scope
if(x<0){ putchar('-'); x=-x; }
^~~~~~~
prog.cpp:14:14: note: suggested alternative: ‘char’
if(x<0){ putchar('-'); x=-x; }
^~~~~~~
char
prog.cpp:17:16: error: ‘putchar’ was not declared in this scope
while(n--) putchar(s[n]);
^~~~~~~
prog.cpp:17:16: note: suggested alternative: ‘char’
while(n--) putchar(s[n]);
^~~~~~~
char
prog.cpp:18:15: error: ‘putchar’ was not declared in this scope
if(endch) putchar(endch);
^~~~~~~
prog.cpp:18:15: note: suggested alternative: ‘char’
if(endch) putchar(endch);
^~~~~~~
char