how to get string from user in cpp code example
Example: how to get string from user in cpp
string firstName;
cout << "Type your first name: ";
cin >>
firstName;
// get user input from the keyboard
cout << "Your name is: " <<
firstName;
// Type your first name: John
// Your name is: John