Void function: a function-definition is not allowed here before '{' token

there is no such thing as an interpreter. It's a compiler.

post the full code and we'll have a look.