标题:string的拼接的问题
取消只看楼主
troyzyc
Rank: 1
等 级:新手上路
帖 子:108
专家分:0
注 册:2016-7-4
结帖率:56.6%
已结贴  问题点数:5 回复次数:0 
string的拼接的问题
#include<iostream>
#include<string>

using namespace std;
int main()
{

    string f,l,name;
    cout<<"enter your first name:";
    getline(cin,f);
    cout<<"enter your last  name:";
    getline(cin,l);
    name=f+l;
    cout<<"here 's the information:"<<name<<endl;      这里name为什么输入的内容显示不全面?是因为getline函数的原因,原因是什么?
    return 0;
}
搜索更多相关主题的帖子: include 拼接 
2017-04-15 10:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-476134-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.113277 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved