auto foo(int i) { return (i == 1) ? i : foo(i-1)+i ; } int main() { }
Standard input is empty
prog.cpp:1:15: warning: ‘foo’ function uses ‘auto’ type specifier without trailing return type [enabled by default] auto foo(int i) { ^ prog.cpp: In function ‘auto foo(int)’: prog.cpp:2:25: error: use of ‘auto foo(int)’ before deduction of ‘auto’ return (i == 1) ? i : foo(i-1)+i ; ^
Standard output is empty