getline:
getline - C++ Reference
CIN >> darfst du gerne selber nachschlagen, was es ist . Als Tipp:he delimiter character is delim for the first function version, and '\n' (newline character) for the second. The extraction also stops if the end of file is reached in is or if some other error occurs during the input operation.
If the delimiter is found, it is extracted and discarded, i.e. it is not stored and the next input operation will begin after i
Using cin to get user input. - C++ Forums
D.h die eine Eingabeform belässt "\n" im Puffer, die andere ließt es dagegen ein und nutzt es zudem als "Trennzeichen".Cin is notorious at causing input issues because it doesn't remove the newline character from the stream or do type-checking. So anyone using cin >> var; and following it up with another cin >> stringtype; or getline(); will receive empty inputs. It's best practice to NOT MIX the different types of input methods from cin.
Und die Moral von der Geschicht': mische beide Eingabeformen nicht (alternativ: verwende eine anständig designte Sprache mit zeitgemäßen Libs *duck & run :p* )