다음을 통해 공유


multiset::find (STL/CLR)

지정된 키와 일치하는 요소를 찾습니다.

    iterator find(key_type key);

매개 변수


  • 검색할 키 값입니다.

설명

제어 되는 시퀀스에 요소가 한 개 이상에 해당 하는 주문 경우 key, 멤버 함수; 요소 중 하나를 지정 하는 반복기를 반환 합니다. 그렇지 않으면 multiset::end (STL/CLR)().제어 시퀀스에서 지정 된 키와 일치 하는 현재 요소를 찾는 데 사용 합니다.

예제

// cliext_multiset_find.cpp 
// compile with: /clr 
#include <cliext/set> 
 
typedef cliext::multiset<wchar_t> Mymultiset; 
int main() 
    { 
    Mymultiset c1; 
    c1.insert(L'a'); 
    c1.insert(L'b'); 
    c1.insert(L'c'); 
 
// display initial contents " a b c" 
    for each (wchar_t elem in c1) 
        System::Console::Write(" {0}", elem); 
    System::Console::WriteLine(); 
 
    System::Console::WriteLine("find {0} = {1}", 
        L'A', c1.find(L'A') != c1.end()); 
    System::Console::WriteLine("find {0} = {1}", 
        L'b', *c1.find(L'b')); 
    System::Console::WriteLine("find {0} = {1}", 
        L'C', c1.find(L'C') != c1.end()); 
    return (0); 
    } 
 
  

설명

참고 find 발견 몇 가지 요소는 보장 하지 않습니다.

요구 사항

헤더: < cliext/설정 >

네임 스페이스: cliext

참고 항목

참조

multiset (STL/CLR)

multiset::equal_range (STL/CLR)

multiset::lower_bound (STL/CLR)

multiset::upper_bound (STL/CLR)