Home | History | Annotate | Download | only in data-formatter-categories
      1 //===-- main.cpp ------------------------------------------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 #include <stdio.h>
     11 #include <stdlib.h>
     12 #include <stdint.h>
     13 
     14 struct Shape
     15 {
     16 	bool dummy;
     17 	Shape() : dummy(true) {}
     18 };
     19 
     20 struct Rectangle : public Shape {
     21     int w;
     22     int h;
     23     Rectangle(int W = 3, int H = 5) : w(W), h(H) {}
     24 };
     25 
     26 struct Circle : public Shape {
     27     int r;
     28     Circle(int R = 6) : r(R) {}
     29 };
     30 
     31 int main (int argc, const char * argv[])
     32 {
     33     Rectangle r1(5,6);
     34     Rectangle r2(9,16);
     35     Rectangle r3(4,4);
     36 
     37     Circle c1(5);
     38     Circle c2(6);
     39     Circle c3(7);
     40 
     41     Circle *c_ptr = new Circle(8);
     42     Rectangle *r_ptr = new Rectangle(9,7);
     43 
     44     return 0; // Set break point at this line.
     45 }
     46 
     47