When we try to take input from user using cin.getline() function then there is necessary to call cin.ignore function before that line to successfully done that work. Otherwise the program takes the garbage values for the next iteration.
mindhacker
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.