foo.cc: In function 'int main()':
foo.cc:9:20: error: initializer fails to determine size of 'fib'
9 | int *fib[]=new int[n];
| ^~~~~~~~~~
foo.cc:9:20: error: array must be initialized with a brace-enclosed initializer
foo.cc:10:16: error: invalid conversion from 'int' to 'int*' [-fpermissive]
10 | fib[0]=1;
| ^
| |
| int
foo.cc:11:16: error: invalid conversion from 'int' to 'int*' [-fpermissive]
11 | fib[1]=1;
| ^
| |
| int
foo.cc:13:32: error: invalid operands of types 'int*' and 'int*' to binary 'operator+'
13 | fib[i]=fib[i-1]+fib[i-2];
| ~~~~~~~~^~~~~~~~~
| | |
| int* int*
foo.cc:15:23: error: 'a' was not declared in this scope
15 | cout<<a[i]<<" ";
| ^
[Hydro](https://hydro.ac)提供评测服务