View Single Post
  #4 (permalink)  
Old February 29th, 2008, 11:50 AM
Ankur_Verma Ankur_Verma is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

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
Reply With Quote