1 | namespace NN |
2 | { |
3 | int a = 778899; |
4 | int b = 665544; |
5 | int c = 445566; |
6 | } |
7 | |
8 | class A |
9 | { |
10 | public: |
11 | A(); |
12 | int Method(int a, int b); |
13 | |
14 | private: |
15 | int a, b; |
16 | }; |
17 | |
18 | A::A() : a(10), b(100) { } |
19 | |
20 | int a = 112233; |
21 | int b = 445566; |
22 | int c = 778899; |
23 | |
24 | int |
25 | A::Method(int a, int b) |
26 | { |
27 | { |
28 | int a = 12345; |
29 | int b = 54321; |
30 | int c = 34567; |
31 | this->a = a + b + this->b; // Break 2 |
32 | } |
33 | |
34 | { |
35 | using namespace NN; |
36 | int a = 10001; |
37 | int b = 10002; |
38 | int c = 10003; |
39 | this->a = a + b + this->b; // Break 3 |
40 | } |
41 | |
42 | return this->a + this->b + a + b; // Break 4 |
43 | } |
44 | |
45 | int |
46 | Function(int a, int b) |
47 | { |
48 | int A; |
49 | |
50 | { |
51 | int a = 12345; |
52 | int b = 54321; |
53 | int c = 34567; |
54 | A = a + b + c; // Break 5 |
55 | } |
56 | |
57 | { |
58 | using namespace NN; |
59 | int a = 10001; |
60 | int b = 10002; |
61 | int c = 10003; |
62 | A = a + b + c; // Break 6 |
63 | } |
64 | |
65 | return A + a + b; // Break 7 |
66 | } |
67 | |
68 | int |
69 | main() |
70 | { |
71 | A obj; |
72 | return obj.Method(a: 1, b: 2) + Function(a: 1, b: 2); // Break 1 |
73 | } |
74 | |