"function-definition is not allowed" error

You are correct, Fjornir. Thanks for pointing out that difference from formal C.