c++ input string
xxxxxxxxxx
#include <iostream>
int main()
{
string x;
std::cout << "Type something: ";
std::getline(std::cin, x);
std::cout << "What you typed: " << x << std::endl;
return 0;
}
xxxxxxxxxx
string fullName;
cout << "Type your full name: ";
getline (cin, fullName);
cout << "Your name is: " << fullName;