foo.cc: In function 'void f(int)':
foo.cc:9:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
9 | return n;
| ^
foo.cc:14:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
14 | return n;
| ^
foo.cc:16:15: error: invalid operands of types 'void' and 'void' to binary 'operator+'
16 | return f(n-1)+f(n-2);
| ~~~~~~^~~~~~~
| | |
| void void
foo.cc:16:21: error: return-statement with a value, in function returning 'void' [-fpermissive]
16 | return f(n-1)+f(n-2);
| ^
foo.cc:18:1: error: a function-definition is not allowed here before '{' token
18 | {
| ^
foo.cc:23:1: error: expected '}' at end of input
23 | }
| ^
foo.cc:5:1: note: to match this '{'
5 | {
| ^
[Hydro](https://hydro.ac)提供评测服务