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
main(int argc,const char * argv[])28 int main (int argc, const char * argv[])
29 {
30 i_am_cool one(1,3.14,'E');
31 i_am_cool two(4,2.71,'G');
32
33 i_am_cool* twoptr = &two;
34
35 i_am_cool array[5];
36
37 i_am_cooler three(10,4,1985,1/1/2011,'B','E'); // Set break point at this line.
38
39 two.integer = 1;
40
41 int dummy = 1;
42
43 return 0;
44 }
45