Function-definition error before '{' token in C++

  • Thread starter Thread starter NDiggity
  • Start date Start date
  • Tags Tags
    Compiler Error
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
NDiggity
Messages
53
Reaction score
0

Homework Statement


Well I believe I have solved the problem correctly but I am not sure what I am doing wrong. I get the compiler error "a function-definition is not allowed here before ‘{’ token"

Here is my pasted code: http://rafb.net/p/8P4HYa49.html
 
Last edited:
Physics news on Phys.org
Nevermind, I realized I have to put the function above int main().