-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3_containers.cpp
More file actions
50 lines (36 loc) · 754 Bytes
/
3_containers.cpp
File metadata and controls
50 lines (36 loc) · 754 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*-- Brief --*/
/*
using stl:: to practice several sequential containers
vector<>
deque<>
...
and more
*/
#include <vector>
#include <deque>
void myTestDeque()
{
deque<uint8_t*> buffer(3);
buffer[0]=new uint8_t[2560*832];
buffer[1]=new uint8_t[2560*832];
buffer[2]=new uint8_t[2560*832];
delete[] buffer;
}
void myTestVector()
{
vector<double> v {1.0 ,2.9 ,5.2 ,0.3 ,10.5};
vecotr<int> v1 {1, 2, 5, 0, 10};
double max = *max_element(v.begin(), v.end());
double min = *min_element(v.begin(), v.end());
}
using namespace std;
int main()
{
int idx = 0;
while(begin !=end){
*begin = val;
++begin;
}
idx++;
return;
}