#include<iostream>
#include<string>
using namespace std;
int main()
{
string firstname;
string name;
cout << "Enter your first name:";
getline(cin,firstname);
cout << "Enter your last name:";
getline(cin,name);
name += ", ";
name += firstname;
cout << "Here's the information in a single string: " << name << endl;
return 0;
}
Exercise 4.4
最新推荐文章于 2020-03-20 16:05:35 发布