Its hard to assess this code for any problem as what goes in 'check' is not given here. Also to be able to better scrutinize your code for any problem its always advisable to mark smaller areas that you think are most susceptible of a lapse, (in this case its the area where you are using getline), and running or dry running them separately. Stuck still? You can always right back but with cleaner, succinct code snippet this time.
Regards
Ankur
|