The problem ain't getline.
I can remove getline from whole code and just use cin. Nothing will change, only than the second cin will be ignored, like my example demonstrates.
Put that in code tags, how are we supposed to analyze the code if it's illegible?
And chances are the problem *is* getline. Even if the getline actually works, it probably is still due to the buffering issues with getline.
If you remove getline and use cin (ONLY cin, no mixing, as that is generally bad), does it still work? Have you tried it? The way getline and cin operate are quite different.
I made it work. I can use as many cin as i want now, including mixing cin, >> and getline with if, else. I tryed this code and it worked before in past. Now that i have the newest windows and Visual C++ updated to newest it doesn't works like that anymore and i can't use many of .h includes also anymore.