If i use cin.ignore(), when i use getline(cin, var1) it will just forget about the first character in var1. Also, for some reason, cin.ignore also makes cout not display anything at all in the rest of the function until some form of cin is used.
Is there any effective way to clear the stream without affecting anything else?