void print(const std::string &s)
{
for (std::string::size_type i = 0; i < s.size(); i++) {
std::cout << s[i] << ' ';
}
}
// C++ program to demonstrate getline() function
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
cout << "Please enter your name:
";
getline(cin, str);
cout << "Hello, " << str
<< " welcome to GfG !
";
return 0;
}