foo.cc: In function 'int main()':
foo.cc:8:15: error: expected primary-expression before '%' token
8 | scanf("%d %d",%x1,%x2);
| ^
foo.cc:8:19: error: expected primary-expression before '%' token
8 | scanf("%d %d",%x1,%x2);
| ^
foo.cc:16:12: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
16 | printf( x1+x2 );
| ~~^~~
| |
| int
In file included from foo.cc:1:
/nix/store/1x86jfiwsp5qi448fcdkkzn7vmx4krv2-glibc-2.35-163-dev/include/stdio.h:356:43: note: initializing argument 1 of 'int printf(const char*, ...)'
356 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:16:18: error: expected '}' at end of input
16 | printf( x1+x2 );
| ^
foo.cc:9:9: note: to match this '{'
9 | while(1){
| ^
foo.cc:16:18: error: expected '}' at end of input
16 | printf( x1+x2 );
| ^
foo.cc:4:1: note: to match this '{'
4 | {
| ^
[Hydro](https://hydro.ac)提供评测服务