array코드
연초록
질문 제목 :
array code?
질문 요약 :source coding below질문 내용 :
#include stdio.h
typedef struct ch_developertypedef unsigned int uint;//#define enumchk // 이 행이 주석처리 되어있으면 #ifndef enumchk 이 실행 // 위 행이 주석처리가 안 되어있으면 #ifdef enumchk 이 실행
struct myplace{ char jooin[10]; char postno[8]; char city[10]; char goo[10]; uint cnt;};typedef enum familycnt{ one =1, two=2, three=3, four=4, five=5} famcnt;
int main(void){ uint i; famcnt inwon;; chdeveloper arr[3]= { {김성주, 100-100, 청주시, 용산구, one}, {이민아, 100-200, 부산시, 해운대구, two}, {서문찬, 100-300, 문산시, 마포구, five} }; for(i=0; i3;i++) { printf(%10s %10s %10s %10s %3d \n, arr[i].jooin, arr[i].postno, arr[i].city, arr[i].goo, arr[i].cnt); } printf(\n); #ifdef enumchk for(inwon=one; inwon=five; inwon+=1) { switch(people) { case one: printf(1 입니다\n); break; case two: printf(2 입니다\n); break; case three: printf(3 입니다\n); break; case four: printf(4 입니다\n); break; case five: printf(5 입니다\n); break; } }#endif #ifndef enumchk for(people=one; inwon=five; inwon+=1) { switch(people) { case one: printf(11 입니다\n); break; case two: printf(22 입니다\n); break; case three: printf(33 입니다\n); break; case four: printf(44 입니다\n); break; case five: printf(55 입니다\n); break; } }#endif
getch();return 0;}
이렇게 짜는것 맞나요?그런데 이 소스 코드가무엇을 의미하나요?
설명 참조 부탁드립니다.....