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)提供评测服务