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
- 라인트레이서
- Stack
- directx
- C언어
- arduino compiler
- list
- 컴퓨터 그래픽스
- 아두이노
- 아두이노 소스
- 시스템프로그래밍
- Algorithm
- LineTracer
- 통계학
- vector
- Deque
- c++
- priority_queue
- queue
- map
- 아두이노 컴파일러
- 운영체제
- 자료구조
- WinAPI
- stl
- Arduino
- html
- Array
- Visual Micro
- set
- 수광 소자
Archives
- Today
- Total
Kim's Programming
List - unique() 본문
소스)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include<list> #include<iostream> void print(std::list<int> Target_List) { for (std::list<int>::iterator IterPos = Target_List.begin(); IterPos != Target_List.end(); ++IterPos) std::cout << *IterPos << " "; std::cout << std::endl; } void main() { std::list<int> List = { 1,1,3,5,2,7,2,3,6}; print(List); List.unique(); print(List); } | cs |
내용)
연속된 중복데이터를 하나로 묶어줍니다.
결과)
'STL - Container > Container - List' 카테고리의 다른 글
List - splice() (0) | 2016.01.29 |
---|---|
List - swap() (0) | 2016.01.29 |
List - sort() (0) | 2016.01.29 |
List - size() (0) | 2016.01.29 |
List - reverse() (0) | 2016.01.29 |