일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 effective c++
- reference
- 보편 참조
- std::async
- 영화
- 암시적 변환
- 반복자
- 티스토리챌린지
- effective stl
- lua
- 상속
- 스마트 포인터
- operator new
- universal reference
- Smart Pointer
- effective modern c++
- 예외
- 게임
- resource management class
- 언리얼
- iterator
- exception
- UE4
- virtual function
- c++
- 참조자
- 영화 리뷰
- 오블완
- implicit conversion
- Effective c++
Archives
- Today
- Total
목록2025/01/15 (1)
스토리텔링 개발자
[Effective STL] 45. 탐색 전략 선택
항목 45. count, find, binary_search, lower_bound, upper_bound, 그리고 equal_range를 제대로 파악해 두자 탐색 전략 선택빠르고 간단한 방법을 선택하면 된다.정렬되었는가?binary_search, lower_bound, upper_bound, equal_range대개 로그시간에 수행된다.정렬되지 않았는가?count, find 정렬되지 않은 요소 탐색 (count와 find)list lw;Widget w;...// w가 들어있는지 체크한다.// count를 사용한 방법if(count(lw.begin(), lw.end(), w)){ ...}// count를 사용한 방법 2if(count(lw.begin(), lw.end(), w) != 0){ ..
Effective C++/Effective STL
2025. 1. 15. 11:39