My compiler (VisualStudio) is telling me that there is an error on the 40th line. Specifically, it is telling me that a semi-colon was expected. I know that all of the libraries i've included arent necessary, but I've been leaving them at the top just so I dont need to write them every time. I've tried the program with only iostream. That hasn't worked either.
I've copied this program straight out of the Absolute C++ book by W. Savitch.
Edit: the error is on the 37th line. Visual studio highlights this line in red.