hey tyky,
Keep in mind the folks on this forum aren't being paid to help you. We're doing it because we enjoy programming. You may get lucky, but odds are that few people are going to have fun reading through a bunch of improperly formatted code to find an unknown error for you. It's like if someone were to say "My computer's not working, fix it for me."
Especially if you're on a time crunch, take some time to write up an explanation of what exactly is the problem. Which part are you stuck on. Pretend you have to ask just one or two questions and then you're done.
I haven't read your code in detail, but in general you will want to break it up and test each different part individually to see which part is broken. If you want to fix a car, you try your best to figure out which part is broken and test each component individually. Similar idea here. As helios mentioned, print out some statements to make sure the variables you're have are holding the variables you expect at the times you expect them. So something like:
|
cout << "my_variable: " << my_variable << endl;
|
Do this as a sanity check to ensure things are working as they should be at separate places in your code. Odds are somewhere along the way you'll find that the variables are being modified when you didn't intend.
Also, if you're being graded on your use of classes, my guess is you will obtain a low score, even if your program works. You are essentially using classes as a struct. The basic idea of a class is to group together variables and methods that belong together. There are no functions in any of the classes you defined in your code. See this site's tutorial on classes for more info (
http://www.cplusplus.com/doc/tutorial/classes.html). Ultimately you will probably want to stick those functions inside the class.
Finally, once you've done that, modify your program to include the proper use of classes and try to get it to work again. If it still fails, try asking for help again, but be specific in your questions. If you're confused about how classes work, say so, and ask a question about what particular part of the concept you're confused about.
I guess another option is to follow the link to the "College Homework Help Now" banner/link I saw advertised at the top of this page. Might as well support the site.