-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathset_erase.cpp
More file actions
22 lines (19 loc) · 518 Bytes
/
Copy pathset_erase.cpp
File metadata and controls
22 lines (19 loc) · 518 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <set>
int main(int argc, char* argv[]) {
std::set<int> test_set;
test_set.insert(3);
test_set.insert(1);
test_set.insert(99);
test_set.insert(10);
test_set.insert(77);
std::set<int>::iterator set_itr = test_set.begin();
for (; set_itr != test_set.end(); set_itr++) {
std::cout << *set_itr << ", ";
// test_set.erase(*set_itr++);
}
// test_set.erase(set_itr, test_set.end());
return 0;
}