function-definition is not allowed here before '{' token ERROR

Hey I am sharing you the screenshot pls pls respond..