try this. it works. Umm getline and cin dont fit together. Wait for the experts for detailed explanation. But, as I know cin.ignore(); should be added after each cin so we can use getline and cin together. For some reason it skips a line. But just used getline for everything now.
However, if you need to cin a int then that might be a problem. So just do cin.ignore();
I believe for cin which is istream class the default delimiter is a whitespace so if you have a whitespace in your input string, they are discarded. For getline, the default delimiter is a newline which means it break upon newline which correspond to the Enter/Return key you enter to terminate your input.