Study
STL algorithm - find() 본문
#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 |