/ Vijos /

记录详情

Compile Error

foo.cc:31:8: warning: multi-character character constant [-Wmultichar]
   31 | printf('%d',ans);
      |        ^~~~
foo.cc: In function 'int main()':
foo.cc:31:8: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from foo.cc:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:105:32: note:   initializing argument 1 of 'int printf(const char*, ...)'
  105 | printf (const char *__restrict __fmt, ...)
      |         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
foo.cc:15:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   15 | scanf("%d",&n);
      | ~~~~~^~~~~~~~~
foo.cc:18:13: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   18 | while (scanf("%d",&x),x != 0)
      |        ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1022 Victoria的舞会2
语言
C++
递交时间
2021-12-12 14:54:55
评测时间
2021-12-12 14:54:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes