foo.c:2:1: error: unknown type name ‘using’
2 | using namespace std;
| ^~~~~
foo.c:2:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘std’
2 | using namespace std;
| ^~~
foo.c: In function ‘main’:
foo.c:14:5: error: ‘cin’ undeclared (first use in this function)
14 | cin>>n;
| ^~~
foo.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:15:9: error: expected expression before ‘:’ token
15 | std::cout << fibonacci(n); // 输出斐波那契数列的第n项
| ^
foo.c:15:5: warning: label ‘std’ defined but not used [-Wunused-label]
15 | std::cout << fibonacci(n); // 输出斐波那契数列的第n项
| ^~~