std:矢量流 [英] std:vector to stream

查看:84
本文介绍了std:矢量流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个函数将向量转换为C ++中的STL字符串?

我正在寻找类似于其他语言中可用的拆分/连接类型的函数来拆分和连接数组。

Is there a function to convert a vector to STL string in C++?
I''m looking for something similar to a split/join type of functions available in other languages to split and join arrays.

推荐答案

查看文档 [ ^ ]我没有看到任何内置功能。您总是可以使用迭代器编写一个来提取每个项目,但您也需要管理类型。
Looking at the documentation[^] I don''t see any inbuilt function. You could always write one using the iterator to extract each item, but you would need to manage the types as well.


这篇关于std:矢量流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆