1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <stdint.h>
4
5 struct i_am_cool
6 {
7 int integer;
8 float floating;
9 char character;
i_am_cooli_am_cool10 i_am_cool(int I, float F, char C) :
11 integer(I), floating(F), character(C) {}
i_am_cooli_am_cool12 i_am_cool() : integer(1), floating(2), character('3') {}
13
14 };
15
16 struct i_am_cooler
17 {
18 i_am_cool first_cool;
19 i_am_cool second_cool;
20 float floating;
21
i_am_cooleri_am_cooler22 i_am_cooler(int I1, int I2, float F1, float F2, char C1, char C2) :
23 first_cool(I1,F1,C1),
24 second_cool(I2,F2,C2),
25 floating((F1 + F2)/2) {}
26 };
27
28 struct IWrapPointers
29 {
30 int* int_pointer;
31 float* float_pointer;
IWrapPointersIWrapPointers32 IWrapPointers() : int_pointer(new int(4)), float_pointer(new float(1.111)) {}
33 };
34
35 struct Simple
36 {
37 int x;
38 float y;
39 char z;
SimpleSimple40 Simple(int X, float Y, char Z) :
41 x(X),
42 y(Y),
43 z(Z)
44 {}
45 };
46
47 struct SimpleWithPointers
48 {
49 int *x;
50 float *y;
51 char *z;
SimpleWithPointersSimpleWithPointers52 SimpleWithPointers(int X, float Y, char Z) :
53 x(new int (X)),
54 y(new float (Y)),
55 z(new char[2])
56 {
57 z[0] = Z;
58 z[1] = '\0';
59 }
60 };
61
62 struct Couple
63 {
64 SimpleWithPointers sp;
65 Simple* s;
CoupleCouple66 Couple(int X, float Y, char Z) : sp(X,Y,Z),
67 s(new Simple(X,Y,Z)) {}
68 };
69
70 struct VeryLong
71 {
72 int a_1;
73 int b_1;
74 int c_1;
75 int d_1;
76 int e_1;
77 int f_1;
78 int g_1;
79 int h_1;
80 int i_1;
81 int j_1;
82 int k_1;
83 int l_1;
84 int m_1;
85 int n_1;
86 int o_1;
87 int p_1;
88 int q_1;
89 int r_1;
90 int s_1;
91 int t_1;
92 int u_1;
93 int v_1;
94 int w_1;
95 int x_1;
96 int y_1;
97 int z_1;
98
99 int a_2;
100 int b_2;
101 int c_2;
102 int d_2;
103 int e_2;
104 int f_2;
105 int g_2;
106 int h_2;
107 int i_2;
108 int j_2;
109 int k_2;
110 int l_2;
111 int m_2;
112 int n_2;
113 int o_2;
114 int p_2;
115 int q_2;
116 int r_2;
117 int s_2;
118 int t_2;
119 int u_2;
120 int v_2;
121 int w_2;
122 int x_2;
123 int y_2;
124 int z_2;
125 };
126
main(int argc,const char * argv[])127 int main (int argc, const char * argv[])
128 {
129
130 int iAmInt = 9;
131
132 i_am_cool cool_boy(1,0.5,3);
133 i_am_cooler cooler_boy(1,2,0.1,0.2,'A','B');
134
135 i_am_cool *cool_pointer = new i_am_cool(3,-3.141592,'E');
136
137 i_am_cool cool_array[5];
138
139 cool_array[3].floating = 5.25;
140 cool_array[4].integer = 6;
141 cool_array[2].character = 'Q';
142
143 int int_array[] = {1,2,3,4,5};
144
145 IWrapPointers wrapper;
146
147 *int_array = -1;
148
149 int* pointer = &cool_array[4].integer;
150
151 IWrapPointers *wrap_pointer = &wrapper;
152
153 Couple couple(9,9.99,'X');
154
155 SimpleWithPointers sparray[] =
156 {SimpleWithPointers(-1,-2,'3'),
157 SimpleWithPointers(-4,-5,'6'),
158 SimpleWithPointers(-7,-8,'9')};
159
160 Simple a_simple_object(3,0.14,'E');
161
162 VeryLong a_long_guy;
163
164 return 0; // Set break point at this line.
165 }
166