1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Help With Compiler Error

  1. Oct 31, 2007 #1
    1. The problem statement, all variables and given/known data
    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: Oct 31, 2007
  2. jcsd
  3. Oct 31, 2007 #2
    Nevermind, I realized I have to put the function above int main().
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook