You are mixing input with getline()
and cin
. iIf you are going to do that then you need to flush the input stream after the call to getline()
and before you call cin >>
.
Lucaci Andrew commented: That too. And also... it's Lucaci?!?!... :) +6
nitin1 commented: nice!! +2