首页 > 编程语言 > 详细

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

时间:2015-05-06 11:02:43      阅读:226      评论:0      收藏:0      [点我收藏+]
#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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!