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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
| //===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
struct i_am_cool
{
int integer;
float floating;
char character;
i_am_cool(int I, float F, char C) :
integer(I), floating(F), character(C) {}
i_am_cool() : integer(1), floating(2), character('3') {}
};
struct i_am_cooler
{
i_am_cool first_cool;
i_am_cool second_cool;
float floating;
i_am_cooler(int I1, int I2, float F1, float F2, char C1, char C2) :
first_cool(I1,F1,C1),
second_cool(I2,F2,C2),
floating((F1 + F2)/2) {}
};
struct IWrapPointers
{
int* int_pointer;
float* float_pointer;
IWrapPointers() : int_pointer(new int(4)), float_pointer(new float(1.111)) {}
};
struct Simple
{
int x;
float y;
char z;
Simple(int X, float Y, char Z) :
x(X),
y(Y),
z(Z)
{}
};
struct SimpleWithPointers
{
int *x;
float *y;
char *z;
SimpleWithPointers(int X, float Y, char Z) :
x(new int (X)),
y(new float (Y)),
z(new char[2])
{
z[0] = Z;
z[1] = '\0';
}
};
struct Couple
{
SimpleWithPointers sp;
Simple* s;
Couple(int X, float Y, char Z) : sp(X,Y,Z),
s(new Simple(X,Y,Z)) {}
};
struct VeryLong
{
int a_1;
int b_1;
int c_1;
int d_1;
int e_1;
int f_1;
int g_1;
int h_1;
int i_1;
int j_1;
int k_1;
int l_1;
int m_1;
int n_1;
int o_1;
int p_1;
int q_1;
int r_1;
int s_1;
int t_1;
int u_1;
int v_1;
int w_1;
int x_1;
int y_1;
int z_1;
int a_2;
int b_2;
int c_2;
int d_2;
int e_2;
int f_2;
int g_2;
int h_2;
int i_2;
int j_2;
int k_2;
int l_2;
int m_2;
int n_2;
int o_2;
int p_2;
int q_2;
int r_2;
int s_2;
int t_2;
int u_2;
int v_2;
int w_2;
int x_2;
int y_2;
int z_2;
};
int main (int argc, const char * argv[])
{
int iAmInt = 9;
i_am_cool cool_boy(1,0.5,3);
i_am_cooler cooler_boy(1,2,0.1,0.2,'A','B');
i_am_cool *cool_pointer = new i_am_cool(3,-3.141592,'E');
i_am_cool cool_array[5];
cool_array[3].floating = 5.25;
cool_array[4].integer = 6;
cool_array[2].character = 'Q';
int int_array[] = {1,2,3,4,5};
IWrapPointers wrapper;
*int_array = -1;
int* pointer = &cool_array[4].integer;
IWrapPointers *wrap_pointer = &wrapper;
Couple couple(9,9.99,'X');
SimpleWithPointers sparray[] =
{SimpleWithPointers(-1,-2,'3'),
SimpleWithPointers(-4,-5,'6'),
SimpleWithPointers(-7,-8,'9')};
Simple a_simple_object(3,0.14,'E');
VeryLong a_long_guy;
return 0; // Set break point at this line.
}
|