首页 > 其他 > 详细

合并vector里的内容,输出一个string

时间:2019-11-12 14:33:57      阅读:143      评论:0      收藏:0      [点我收藏+]
 1 string merge_vector(vector<string> dp_scpe_all)
 2 {
 3     //合并vector里的内容
 4     string new_dp_scpe;
 5     for (int m = 0; m < dp_scpe_all.size(); m++)
 6     {
 7         //字符串拼接
 8         string BB1 = dp_scpe_all[m];
 9         new_dp_scpe = new_dp_scpe + BB1;
10         if (m != dp_scpe_all.size() - 1)
11         {
12             new_dp_scpe = new_dp_scpe + ",";
13         }
14     }
15     return new_dp_scpe;
16 }
17 
18 
19 Caesar卢尚宇
20 2019年11月12日

 

合并vector里的内容,输出一个string

原文:https://www.cnblogs.com/nxopen2018/p/11841177.html

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