首页 > 编程语言 > 详细

c++ std::vector<std::string> 操作

时间:2021-09-04 05:48:42      阅读:47      评论:0      收藏:0      [点我收藏+]

知识点

1 std::vector<std::string> 作为返回参数

void GetConfigState(std::vector<std::string>&vtTemp)

2 对于std::vector<std::string>取值操作

std::vector<std::string>::iterator theIterator;

for( theIterator = vtTemp.begin(); theIterator != vtTemp.end(); theIterator++ )

cout<<theIterator->c_str()<<endl;//这样取值

3 不能直接进行容器间赋值

c++ std::vector<std::string> 操作

原文:https://www.cnblogs.com/lockingball/p/15221966.html

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