You have a cin >> yearsLived
between the two getline() calls, which means the second call succeeds immediately on the newline left in the stream by the intervening formatted input. It's basically the problem described here.
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
nitishok commented: thanks. it works with a return; added in if(i==8) +0
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
WaltP commented: Questionable ;o) +14
I_m_rude commented: awesome guess! ;) +0