简体   繁体   中英

C++ - How can I find vector<int> in vector<vector<int>> with STL algorithm function?

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_findto_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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM