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 #include <string.h> 13 14 struct SomeData 15 { 16 int x; 17 }; 18 19 struct SomeOtherData 20 { 21 char strarr[32]; 22 char *strptr; 23 int intarr[5]; 24 float flarr[7]; 25 26 SomeOtherData() 27 { 28 strcpy(strarr,"Nested Hello world!"); 29 strptr = new char[128]; 30 strcpy(strptr,"Nested Hello world!"); 31 intarr[0] = 9; 32 intarr[1] = 8; 33 intarr[2] = 7; 34 intarr[3] = 6; 35 intarr[4] = 5; 36 37 flarr[0] = 25.5; 38 flarr[1] = 25.25; 39 flarr[2] = 25.125; 40 flarr[3] = 26.75; 41 flarr[4] = 27.375; 42 flarr[5] = 27.5; 43 flarr[6] = 26.125; 44 } 45 }; 46 47 int main (int argc, const char * argv[]) 48 { 49 char strarr[32] = "Hello world!"; 50 char *strptr = NULL; 51 strptr = "Hello world!"; 52 int intarr[5] = {1,1,2,3,5}; 53 float flarr[7] = {78.5,77.25,78.0,76.125,76.75,76.875,77.0}; 54 55 SomeData data; 56 57 SomeOtherData other; 58 59 float* flptr = flarr; 60 int* intptr = intarr; 61 62 return 0; // Set break point at this line. 63 64 } 65