1 2 3 4 5 6 7 8 9 10
#include <iostream> int main() { int foo(const int n) { return n+2; } return 0; }
1 2 3
In function 'int main()': Line 6: error: a function-definition is not allowed here before '{' token compilation terminated due to -Wfatal-errors.