1Using getline() will help you.
2Example:
3
4int main()
5{
6 std::string name, title;
7
8 std::cout << "Enter your name: "; //Name: Robert De Niro
9 std::getline(std::cin, name);
10
11 std::cout << "Enter your favourite movie: "; // title: The Irishman
12 std::getline(std::cin, title);
13
14 std::cout << name << "'s favourite movie is " << title;
15}
16