[Solved] c++ getline and ignore
When you write cin.ignore(0,’\n’), you’re saying “Ignore the characters in the stream until you have ignored 0 characters or you reach a ‘\n’”. Since you told the stream to ignore a maximum of 0 characters, it does nothing. When you write cin.ignore(100, ‘\n’), you’re saying “Ignore the characters in the stream until you have ignored … Read more