【发布时间】:2015-11-02 00:24:33
【问题描述】:
我有这个向量,
std::vector <std::vector<std::string> > gname;
gname.push_back(std::vector<std::string>({"John","jake"}));
gname.push_back(std::vector<std::string>({"May", "harold}));
我想将 gname 中的所有值放入,
std:vector<std::string> cname;
这可能使用 c++11 吗?
【问题讨论】:
-
无论使用 C++11,它都是可能的。或者您是否从
<algorithm>询问了一些具体的问题? -
是的。使用算法库。
-
简单的
for怎么样? -
可以,但是有没有使用c++11的班轮?
-
this 问题的可能重复项。