void main(int argc, char *argv[]) { PriceFile* price_file; char price_file_name[100]; char answer[100]; int file_mode; if (argc < 2) { printf("Usage: superm price_file\n"); exit(1); } strcpy(price_file_name,argv[1]); printf("Do you want to clear the file?\n"); gets(answer); if (toupper(answer[0]) == 'Y') file_mode = CLEAR_FILE; else file_mode = KEEP_FILE; price_file = initialize_price_file(price_file_name,file_mode); process(price_file); terminate_price_file(price_file); }