Exercise 4.4

来源:互联网 发布:工业数据采集系统 编辑:程序博客网 时间:2024/05/22 06:46
#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;}