I am guessing from what you have posted that you have never successfully run a C++ program at all. I say this because of the large amount of stuff in your program that is simply not part of C++.
It is one thing to show someone a program and say "This program almost works, but there is a problem that I just can't find." It is something else entirely to post something that isn't a C++ program and say "Please make this work for me." If you had done the first of these, I'd be glad to help you, but I'm not willing to substitute for your textbook. Sorry.