At the end of the program where i have my function definiton it's giving me an error that says that the function definition is not allowed before '{'
Here is my code
You're missing a "}". On your inner for loop on lines 21-25. The Error report is saying that it can't do the function definition there because there haven't been enough ending curly braces for there to be a function definition there.
I would not have noticed this on my own. The error says it's on the function line. thank you though. i just wish there was a compiler that took you straight to the problem