Dlaczego std :: getline () pomija dane wejściowe po sformatowanym wyodrębnieniu?

Mam następujący fragment kodu, który prosi użytkownika o podanie nazwy i stanu: #include <iostream> #include <string> int main() { std::string name; std::string state; if (std::cin >> name && std::getline(std::cin, state)) { std::cout << "Your name is "...