On the face of it, it doesn't look like having a problem other than that the code could do without a few statements. When you are getting inputs using cin, getline etc, you have to always be aware of the carriage return that usually causes problem when you are switching between numerical data inputs ans string type inputs a lot. Here that doesn't seem to be problem but try calling cin.ignore(); before every getline statement, just in case. I dont know what reoccurring cin.get() is acheiving here.
Regards
Ankur
|