foo.cc: In function 'int main()':
foo.cc:9:5: error: 'A' was not declared in this scope
A=getchar();
^
foo.cc:23:11: error: invalid conversion from 'char*' to 'int' [-fpermissive]
putchar(a);
^
In file included from /usr/include/stdio.h:859:0,
from /usr/include/c++/7/cstdio:42,
from /usr/include/c++/7/ext/string_conversions.h:43,
from /usr/include/c++/7/bits/basic_string.h:6361,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio.h:79:1: note: initializing argument 1 of 'int putchar(int)'
putchar (int __c)
^~~~~~~
[Hydro](https://hydro.ac)提供评测服务