i have this part of code i am having trouble with
the point is when the user inputs the number 1
it should ask him to enter another name
but as soon as i hit 1, it asks then skips to the other instructions and the name is changed to nothing
it is like its taking the enter and changing the name to that
It's because there's an un-extracted '\n' at the end of the input buffer. So when you call std::istream::getline( ), std::istream::getline( ) sees it and thinks it's done extracting. What you have to do is remove the contents of the buffer. For example: