brintos

brintos / llvm-project-archived public Read only

0
0
Text · 847 B · 98ea9ca Raw
45 lines · cpp
1#include <stdio.h>2#include <stdlib.h>3#include <stdint.h>4 5struct i_am_cool6{7	int integer;8	float floating;9	char character;10	i_am_cool(int I, float F, char C) :11    integer(I), floating(F), character(C) {}12	i_am_cool() : integer(1), floating(2), character('3') {}13    14};15 16struct i_am_cooler17{18	i_am_cool first_cool;19	i_am_cool second_cool;20	float floating;21	22	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 28int 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