Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

Study

STL algorithm - find() 본문

알고리즘/C++ 개념

STL algorithm - find()

^_^? 2021. 2. 7. 21:09

#include <algorithm>

 

InputIterator find(InputIterator first, InputIterator last, const T& val);

 

·리턴 값

: first부터 last전까지 [first,last) 의 원소들 중 val과 일치하는 첫 번째 원소를 가리키는 반복자 리턴,

  만약 일치하는 원소를 찾지 못할 경우 last를 리턴

The function uses operator == to compare the individual elements to val.

 

 

예제)

 

실행 결과)

 


-참고 사이트

www.cplusplus.com/reference/algorithm/find/

 

'알고리즘 > C++ 개념' 카테고리의 다른 글

set  (0) 2021.07.05
  (0) 2021.05.07
STL algorithm - next_permutation  (0) 2021.02.02
STL algorithm - unique함수를 이용한 문자열 중복제거  (0) 2021.02.02
문자 다루기 - <locale>헤더 파일  (0) 2021.01.12