/ Vijos /

记录详情

Compile Error

foo.cc:4:8: error: expected identifier before numeric constant
    4 | int8_t[3] calc(int n) {
      |        ^
foo.cc:4:8: error: expected ']' before numeric constant
    4 | int8_t[3] calc(int n) {
      |        ^
      |        ]
foo.cc:4:7: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
    4 | int8_t[3] calc(int n) {
      |       ^
foo.cc:4:7: error: structured binding declaration cannot have type 'int8_t' {aka 'signed char'}
foo.cc:4:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:4:7: error: empty structured binding declaration
foo.cc:4:11: error: expected initializer before 'calc'
    4 | int8_t[3] calc(int n) {
      |           ^~~~
foo.cc: In function 'int main()':
foo.cc:35:18: error: 'calc' was not declared in this scope
   35 |   printf("%d\n", calc(n, 0)[0]);
      |                  ^~~~
foo.cc:31:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   31 |   scanf("%d", &n);
      |   ~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1077 克隆龙
语言
C++
递交时间
2022-03-15 17:11:57
评测时间
2022-03-15 17:11:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes