1 //===-- main.cpp ------------------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include <stdio.h> 10 #include <stdlib.h> 11 #include <stdint.h> 12 13 struct i_am_cool 14 { 15 int integer; 16 float floating; 17 char character; 18 i_am_cool(int I, float F, char C) : 19 integer(I), floating(F), character(C) {} 20 i_am_cool() : integer(1), floating(2), character('3') {} 21 22 }; 23 24 struct i_am_cooler 25 { 26 i_am_cool first_cool; 27 i_am_cool second_cool; 28 float floating; 29 30 i_am_cooler(int I1, int I2, float F1, float F2, char C1, char C2) : 31 first_cool(I1,F1,C1), 32 second_cool(I2,F2,C2), 33 floating((F1 + F2)/2) {} 34 }; 35 36 int main (int argc, const char * argv[]) 37 { 38 i_am_cool one(1,3.14,'E'); 39 i_am_cool two(4,2.71,'G'); 40 41 i_am_cool* twoptr = &two; 42 43 i_am_cool array[5]; 44 45 i_am_cooler three(10,4,1985,1/1/2011,'B','E'); // Set break point at this line. 46 47 two.integer = 1; 48 49 int dummy = 1; 50 51 return 0; 52 } 53