// extract to string
#include <iostream>
#include <string>
int main ()
{
std::string name;
std::cout << "Please, enter your full name: ";
std::getline (std::cin,name);
std::cout << "Hello, " << name << "!
";
return 0;
}
string str;
getline(cin, str);
cin.ignore();
//getline allows for multi word input including spaces ex. "Jim Barens"
#include <iostream>
#include <string>
int main()
{
string namePerson{}; // creating string
getline(cin, namePerson);// using getline for user input
std::cout << namePerson; // output string namePerson
}
getline(cin >> ws, title);
#include<bits/stdc++.h>
using namespace std;
#define e "
"
int main()
{
string food, name;
int age;
getline(cin,name);// for space
cin>>age;
cin.ignore();// to ignore the newline character
getline(cin,food);
cout<<name<<" "<<age<<" "<<food<<e;
return 0;
}
std::getline (std::cin,name);