IT/프로젝트 및 실습 컴퓨터 프로그래밍 설계 과제#5_HW01 리드론 2017. 12. 18. 22:18 #include #include struct person { char name[50]; char phone[20]; int pay_hour; int work_hour; int total_pay; }; int main(void) { FILE *pfile = NULL; FILE *wfile = NULL; person **p_array = NULL; pfile = fopen("input.txt", "r"); wfile = fopen("output.txt", "w"); int person_num = 0; if(pfile == NULL) { printf("파일을 읽어올 수 없습니다.\n"); exit(0); } else { fscanf(pfile, "%d", &person_num); fflush(stdin); //printf("%d\n", person_num); } p_array = (person**)malloc(sizeof(person*) * person_num); for(int i=0; i 저작자표시 변경금지