There’s also the getline function: https://en.cppreference.com/w/cpp/string/basic_string/getline
Forgot about it but it reads console input into a string until the end of the line instead of skipping the delimiters like the other operator. Similar functions exist for files as well 🙂