填充向量来自 char * 中的整数
char *values = " 3 1 4 15";
vector<int> array;
填充数组
我想用值3,1,4,15
有没有一种巧妙的方法可以使用 stl 复制算法来做到这一点?
char *values = " 3 1 4 15";
vector<int> array;
I want to populate the array with the values,
3,1,4,15
Is there a slick way to do it with the stl copy algorithm?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确实有:
Indeed there is: