码迷,mamicode.com
首页 > 编程语言 > 详细

C++ Primer第四版习题--3.8

时间:2015-05-06 11:04:41      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:c++ primer第四版

#include <iostream>
#include <string>

int main()
{
    std::string str, str_long;
    std::cin>>str_long;
    while(std::cin>>str)
        str_long = str_long + ' ' + str;
    std::cout << str_long << std::endl;
    return 0;
}

C++ Primer第四版习题--3.8

标签:c++ primer第四版

原文地址:http://blog.csdn.net/xumesang/article/details/45531801

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!