【发布时间】:2017-09-27 13:41:08
【问题描述】:
我有一个 std::string 的简单二维向量。
std::vector<std::vector<std::string> > vec;
std::vector<std::string> v;
现在如何在 vec 的定义位置插入 v?
我尝试使用insert(),但出现错误:
vec.insert(k,v); //k -is an position of vec for inserting
no matching function for call to std::vector<std::vector<std::basic_string<char> > >::insert(int, std::vector<std::basic_string<char> >&)
【问题讨论】:
-
k是什么?请提供minimal reproducible example -
为 k 添加了评论
-
不能添加定义吗? cmets 可以说任何话,与您收到的错误消息完全无关
标签: c++ vector insert 2d-vector