#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;
}
输出:
Please, enter your full name: kilen
Hello, kilen!