Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- directx
- priority_queue
- 컴퓨터 그래픽스
- Stack
- map
- WinAPI
- 아두이노 컴파일러
- list
- queue
- Algorithm
- arduino compiler
- Deque
- 아두이노
- 아두이노 소스
- c++
- Array
- LineTracer
- vector
- 시스템프로그래밍
- 통계학
- html
- set
- 운영체제
- 자료구조
- Visual Micro
- stl
- C언어
- Arduino
- 라인트레이서
- 수광 소자
Archives
- Today
- Total
Kim's Programming
Set - end() 본문
소스)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include<set> #include<iostream> void print(std::set<int> Target_Set) { for (std::set<int>::iterator IterPos = Target_Set.begin(); IterPos != Target_Set.end(); ++IterPos) std::cout << *IterPos << " "; std::cout << std::endl; } void main() { std::set<int> Set = { 1,3,5,7,9,11 }; print(Set); std::cout << *(--Set.end()) << std::endl; print(Set); } | cs |
내용)
end()함수는 가장 마지막 요소의 바로 다음을 가리키는 iterator를 리턴합니다.
결과)
'STL - Container > Container - Set' 카테고리의 다른 글
Set - erase() (0) | 2016.01.31 |
---|---|
Set - equal_range() (0) | 2016.01.31 |
Set - empty() (0) | 2016.01.31 |
Set - emplace_hint() (2) | 2016.01.31 |
Set - crend() (0) | 2016.01.31 |