I have a vector of vector of int that contains some data, say
[ [1,2,3], [7,9] ]
And there is a vector, say a
. I want to find out if vector a
is in that vector of vector. How can I do that?
std::find(std::begin(to_search), std::end(to_search), to_find);
返回迭代器到to_find
中to_search
的位置;如果不包含,则to_search::end()
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.