C ++ STL set :: find()函数 (C++ STL set::find() function)
set::find() function is a predefined function, it is used to check whether an element belong to the set or not, if element finds in the set container it returns an iterator pointing to that element.
set :: find()函数是预定义的函数,用于检查元素是否属于集合,如果元素在集合容器中找到,则返回指向该元素的迭代器。
Prototype:
原型:
set<T> st; //declaration
set<T>::iterator it; //iterator declaration
it=st.find( const T item);
Parameter: const T item
参数: const T项目
Return type: Iterator position
返回类型:迭代器位