First page Back Continue Last page Graphics

struct Example: declaration – 1/4

//

// main.m

// oop1

//

// Created by Deepak Keswani on 23/12/11.

// Copyright (c) 2011 D-Kay Consultancy. All rights reserved.

//

#import <Foundation/Foundation.h>

typedef enum {

kCircle,

kRectangle,

kObletSpheroid

}ShapeType;

typedef enum {

kRedColor,

kGreenColor,

kBlueColor,

}ShapeColor;

typedef struct {

int x,y,width,height;

}ShapeRect;

typedef struct {

ShapeType type;

ShapeColor fillColor;

ShapeRect bounds;

}Shape;