정리 다 필요없고 #define _TESTDEF #ifdef _TESTDEF #define TESTDEFLOGIC(a) (a+10) #else #define TESTDEFLOGIC(a) (a+15) #endif int testintarray[]={0,1,2,3,4,5}; int a[10] = { 0, 2, 4, 6, 8 }; //0~4까지 입력되고 나며지는 0으로 세팅된다 int *testpointarray; typedef struct _st{ int a; }st; struct employee { int id; }; enum testenum { ENUM_0, ENUM_1 id *struc; struc = malloc(sizeof(st)); ((st *)struc)->a = 100; NSLog(@"%d",((st *)struc)->a); free(struc); st *struc2; struc2 = malloc(sizeof(st)); struc2->a = 100; NSLog(@"%d",struc2->a); free(struc2); testpointarray = malloc(sizeof(int) * 10); testpointarray[0]=1; NSLog(@"%d",testpointarray[0]); free(testpointarray); struct employee emp1[2]; emp1[0].id = 99; NSLog(@"%d",emp1[0].id); NSLog(@"%d",ENUM_0); NSLog(@"%d",ENUM_1);
http://www.cocoadev.co.kr/33
이블로그 찾아 보면 끝난다
objective c 설명이 잘되어있다
'아이폰' 카테고리의 다른 글
xcode 4.x에서 좀비 모드 설정하기 (0) | 2012.07.10 |
---|---|
아이폰 스레드 쓰는 방법 (0) | 2011.10.19 |
UITableView 기본 세팅 값들 (0) | 2011.07.01 |
WindowBased로 생성한 프로젝트에 UIViewController붙이기 UINavigationController 붙이기 아이폰 (0) | 2011.06.30 |
UICatalog iphone ui sample source 대박 아이폰 유아이 샘플 소스들 모음집 (0) | 2011.06.29 |