1 #include2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 12 13 int main() 14 { 15 std::vector vec{ 1, 2, 4, 6, 7, 8}; 16 17 //1.简单查找 18 19 //return iterator by value/unaryPred 20 //查找单值出现位置 21 std::cout<<*std::find(vec.begin(),vec.end(),2)<