编写一段程序从标准输入中读入多个字符产并将他们连接在一起,输出连接成的大字符串

include "stdafx.h"
include
include
include<conio.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string result_str, str;
cin >> result_str;
while (cin>>str)
{
result_str = result_str + " "+str;
if (getchar() == ' ')
break;
}
cout << result_str << endl;
return 0;
}

原文地址:https://www.cnblogs.com/wdan2016/p/5898135.html