-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
55 lines (52 loc) · 1.17 KB
/
test.cpp
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
51
52
53
54
55
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main1() {
/*
int a = 9, b = 10;
int c = a & b;
if ((c = 15) > 0) {
cout<<c<<endl;
}
int *p = nullptr;
string s1 = "123";
vector<string> *a1;
a1 = new vector<string>(10, s1);
auto it = a1->begin();
for (auto it = a1->begin(); it != a1->end(); it++ ) {
cout<<*it<<endl;
}
for (int i = 0; i < a1->size(); i++) {
cout<<*(it + i)<<endl;
}
int a0[] = {1,2,4,5,6,7,8,9,0,0,0};
int *p2 = a0;
int *p3 = new int[10];
cout<<p2<<" "<<a0<<" "<<&a0[0]<<endl;
cout<<*p2<<*a0<<a0[0];
cout<<p3<<" "<<*p3<<endl;
delete []p3;
*/
int a[8] ={};
cout<<a[2]<<endl;
//if (!p) cout<<"hehe"<<endl;
}
/*
STATE_MACHINE(){
State cur_State = type_A;
while(cur_State != type_C){
Package _pack = getNewPackage();
switch(){
case type_A:
process_pkg_state_A(_pack);
cur_State = type_B;
break;
case type_B:
process_pkg_state_B(_pack);
cur_State = type_C;
break;
}
}
}
*/