![(c++20) STL::Container #2 - contains, starts_with, ends_with](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcFPxiM%2FbtsIe3MzKr4%2F7fDHkJ6RoZXAs8JWBQwfHK%2Fimg.png)
👨🏻💻 programming/◽ c, c++2024. 6. 17. 18:31(c++20) STL::Container #2 - contains, starts_with, ends_with
"c++20 STL::Container #2" 1. contains기존 map, set 데이터 find함수 사용 시 반복자와 end반복자가 같지 않은 지 비교하는 방식이였다. std::set s {1, 2, 3, 4, 5}; auto findset = s.find(2);if (findset != s.end()){ cout m {{1, 1000}, { 2, 2000 }}; auto findmap = m.find(2); if(findmap != m.end()){ cout second c++20에서 새로 추가 된 contains는 associate container의 내장함수로 찾으려는 키값을 넣으면 true, false로 그 key의 존재 여부를 알 수 있다. if (findset.contains(2)..