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 |
Tags
- list
- Visual Micro
- 시스템프로그래밍
- Stack
- map
- 아두이노 컴파일러
- 자료구조
- priority_queue
- 컴퓨터 그래픽스
- 통계학
- stl
- vector
- Array
- 라인트레이서
- C언어
- Deque
- 수광 소자
- 아두이노
- Arduino
- 아두이노 소스
- WinAPI
- LineTracer
- Algorithm
- c++
- arduino compiler
- directx
- html
- set
- queue
- 운영체제
Archives
- Today
- Total
Kim's Programming
Set - cbegin() 본문
소스)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #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 }; std::set<int>::const_iterator cIter = Set.cbegin(); print(Set); std::cout << *cIter << std::endl; print(Set); } | cs |
내용)
cbegin()함수는 가장 앞에 있는 요소를 가리키는 const iterator를 리턴합니다.
결과)
'STL - Container > Container - Set' 카테고리의 다른 글
Set - clear() (0) | 2016.01.31 |
---|---|
Set - emplace() (0) | 2016.01.31 |
Set - cend() (0) | 2016.01.31 |
Set - begin() (0) | 2016.01.31 |
Set - 멤버변수 (0) | 2016.01.31 |