blob: 967a601dc2c006e09a7bb498fd251a46aaa66933 (
plain)
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
32
33
34
35
36
|
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int x = 5;
class A{A(){x++;}};
// {
// int a_;
// };
class B: public A{
int b_;
};
int main(){
cout<<"Hello World";
set<int> s;
s.insert(1);
s.insert(2);
x++;
cout<<"x="<<x<<endl;
vector<int> t;
t.push_back(2); t.push_back(1); t.push_back(2); t.push_back(3); t.push_back(2); t.push_back(4);
for(vector<int>::iterator it = t.begin(); it != t.end(); it++){
if (*it ==2) t.erase(it);
cout <<*it<<endl;
}
}
|