user-0 提问: c语言 vc6.0 程序改错

回复:
user: user-1
content: err.cpp：#include <stdio.h> #include <stdlib.h> #include <string.h>  #define	PARKING_POSITION_NUM 100 #define	FILE_CAR "car.txt" #define	FILE_IN_PATH "car_in.txt" #define	FILE_OUT_PATH "car_out.txt" #define	FILE_REPORT	"car_report.txt"  int	parking_pos[PARKING_POSITION_NUM] =	{0};  typedef	struct car_list	{ 	char car_num[20]; 	int	month; 	int	day; 	int	hour; 	int	parking_position; 	struct car_list	*next; } Node;  Node *pHead, *p;  int	get_user_operation(); int	x; void car_drive_in(); void car_drive_out(); void search_all(); void search_by_position(); void search_by_number(); void daily_report(); void system_exit(); void press_return(); void write_to_file(); void read_from_file(); void clear_list(); void print_list(); int	is_empty_list(); //int tmp; void record_car_in(Node	*tmp); void record_car_out(int	month, int day,	char* car_num, int price);  int	main() { 	int	x; 	printf("\t\t\t***********************\n"); 	printf("\t\t\t*        主菜单       *\n"); 	printf("\t\t\t***********************\n"); 	printf("\t\t\t*1车辆驶入   2车辆驶出*\n"); 	printf("\t\t\t*3整理查询   4车位查询*\n"); 	printf("\t\t\t*5车牌查询   6日统计*\n"); 	printf("\t\t\t*7退出系统\n"); 	printf("\t\t\t    请选择[1/2/3/4/5/6/7]:"); 	scanf("%d",&x);  	switch (x) { 	case 1: 		read_from_file(); 		car_drive_in(); 		break;  	case 2: 		car_drive_out(); 		break;  	case 3: 		search_all(); 		break;  	case 4: 		search_by_position(); 		break;  	case 5: 		search_by_number(); 		break;  	case 6: 		daily_report(); 		break;  	case 7: 		system_exit(); 		break;  	default: 		printf("Not support!\n"); 		break; 	} 	/* 	if(x ==	1) { read_from_file();car_drive_in();} 	else if(x==2) car_drive_out(); 	else if(x==3) search_all(); 	else if(x==4) search_by_position(); 	else if(x==5) search_by_number(); 	else if(x==6) daily_report(); 	else if(x==7) system_exit(); 	*/ 	return 0; } int	get_user_operation() { 	char ch; 	while(1) { 		printf("请选择："); 		scanf(" %c", &ch); 		//Node *tmp; 		if (ch < '0' || ch > '7') { 			printf("输入有误,请重新输入.\n"); 			printf("\n"); 			//print_main_menu(); 		} else { 			return ch -	'0'; 		} 	} }  void car_drive_in()	{ 	int	pos	= -1; 	int	i; 	Node *tmp; 	tmp	= (Node	*)malloc(sizeof(Node)); 	printf("车辆驶入: \n"); 	print_list(); 	printf("请输入车牌号: \n"); 	printf("例如: s1656\n"); 	scanf(" %s", tmp->car_num); 	printf("请输入驶入时间: \n"); 	printf("4月4号34点输入: 4:4:34\n"); 	scanf(" %d:%d:%d", &tmp->month, &tmp->day, &tmp->hour); 	for(i =	0; i < PARKING_POSITION_NUM; i++ ) { 		if(	parking_pos[i] == 0	) { 			pos	= i	+ 1; 			parking_pos[i] = 1; 			break; 		} 	} 	if (pos	== -1) { 		printf("车位已满，停车失败。 \n"); 		return; 	} 	tmp->parking_position =	pos; 	tmp->next =	NULL; 	p->next	= tmp; 	p =	tmp; 	record_car_in(tmp); 	write_to_file(); 	printf("车辆进入停车场成功,时间已经自动载入!:\n"); 	printf("车牌为%s的汽车驶入时间为:%d月%d日%d时停在%d车位\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, pos); 	press_return(); } void car_drive_out() { 	Node *tmp =	NULL; 	char car_num[20]; 	if (is_empty_list()	== 1) { 		printf("当前停车场没有车.\n"); 		press_return(); 		return; 	} 	print_list(); 	printf("车辆驶出: \n"); 	printf("请输入车牌号：\n"); 	scanf(" %s", car_num); 	if (pHead) 		tmp	= pHead->next; 	else 		tmp	= NULL; 	while(tmp!=NULL) { 		int	m_month; 		int	m_day; 		int	m_hour; 		int	sum=0; 		int	park_hour; 		int	day_hour = park_hour % 24; 		int	park_day = (park_hour -	day_hour) /	24; 		if(day_hour	>= 8) 			if(strcmp(tmp->car_num,	car_num)==0) { 				/* 				struct time; 				{ 					int	month; 					int	day; 					int	hour; 				} 				*/ 				int	park_hour =	(m_month - tmp->month) * 30	* 24 + (m_day -	tmp->day) *	24 + (m_hour - tmp->hour); 				printf("请输入取车时间：\n"); 				printf("4月4号44点输入: 4:4:44\n"); 				scanf(" %d:%d:%d", &m_month, &m_day, &m_hour); 				if (park_hour <	0) { 					{ 						printf("错误的输入时间."); 						press_return(); 						return; 					} 					{ 						sum=(park_day +	1) * 8; 					} 				} else { 					sum	= park_day * 8 + day_hour *	1; 				} 				parking_pos[tmp->parking_position-1] = 0; 				// 清空当前车 				p->next	= tmp->next; 				free(tmp); 				printf("请交纳停车费： %d \n", sum); 				record_car_out(m_month,	m_day, car_num,	sum); 				return; 			} 		tmp	= tmp->next; 		p =	p->next; 		write_to_file(); 	} 	printf("查无此车.\n"); 	press_return(); } void system_exit() { 	printf("程序退出\n"); 	exit(0); } void press_return()	{ 	while(1) { 		printf("按下 r 返回主菜单.\n"); 		char ch; 		scanf(" %c", &ch); 		if (ch == 'r') { 			return; 		} 	} } void write_to_file() { 	FILE *fp; 	remove(FILE_CAR); 	fp = fopen(FILE_CAR, "w"); 	Node *tmp =	pHead->next; 	while(tmp) { 		fprintf(fp,	"%s\t%d\t%d\t%d\t%d\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, tmp->parking_position); 		tmp	= tmp->next; 	} 	fflush(fp); 	fclose(fp); } void record_car_in(Node	*tmp) { 	FILE *fp; 	fp = fopen(FILE_IN_PATH, "a+"); 	fprintf(fp,	"%d\t%d\t%s\n", tmp->month, tmp->day, tmp->car_num); 	fflush(fp); 	fclose(fp); }  void record_car_out(int	month, int day,	char* car_num, int price) { 	FILE *fp; 	fp = fopen(FILE_OUT_PATH, "a+"); 	fprintf(fp,	"%d\t%d\t%s\t%d\n", month, day, car_num, price); 	fflush(fp); 	fclose(fp); } void read_from_file() { 	clear_list(); 	FILE *fp; 	fp = fopen(FILE_CAR, "r"); 	if (fp == NULL)	{ 		return; 	} 	p =	pHead; 	Node *tmp; 	tmp	= (Node	*)malloc(sizeof(Node)); 	while(fscanf(fp,"%s\t%d\t%d\t%d\t%d", tmp->car_num, &tmp->month, &tmp->day, &tmp->hour, &tmp->parking_position) != EOF) { 		tmp->next =	NULL; 		p->next	= tmp; 		p =	tmp; 		parking_pos[tmp->parking_position -1] =	1; 		tmp	= (Node	*)malloc(sizeof(Node)); 	} } void clear_list() { 	Node *tmp; 	tmp	= pHead->next; 	while(tmp!=NULL) { 		pHead->next=tmp->next; 		free(tmp); 		tmp=pHead->next; 	} 	pHead->next	= NULL; 	p =	pHead; } void print_list() { 	printf("当前停车:\n"); 	printf("车牌号 入场时间 停车位置 \n"); 	Node *tmp; 	tmp	= pHead->next; 	while(tmp!=NULL) { 		printf("%s\t%d月%d日%d时\t%d\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, tmp->parking_position); 		tmp	= tmp->next; 	} } int	is_empty_list()	{ 	if(pHead->next==NULL) { 		return 1; 	} 	return 0; } void search_all() { 	int	i; 	int	count =	0; 	for(i=0; i<	PARKING_POSITION_NUM; i++) { 		if (parking_pos[i]==1) { 			count ++; 			printf("车位 %d 已被使用\n", i+1); 		} 	} 	printf("已经使用车位%d, 还剩下 %d\n", count, PARKING_POSITION_NUM-count); } void search_by_position() { 	int	pos; 	printf("请输入查询的车位号: [1-%d]\n", PARKING_POSITION_NUM); 	scanf(" %d", &pos); 	if(parking_pos[pos-1]==1) { 		Node *tmp =	pHead->next; 		while(tmp) { 			if (pos==tmp->parking_position)	{ 				printf("该车位正在被如下车使用\n"); 				printf("车牌%s于%d月%d日%d时停入\n", tmp->car_num, tmp->month, tmp->day, tmp->hour); 				break; 			} 			tmp	= tmp->next; 		} 	} else { 		printf("该车位并没有使用."); 	} 	press_return(); } void search_by_number()	{ 	char car_num[20]; 	printf("请输入需要查询的车牌号\n"); 	scanf(" %s", car_num); 	Node *tmp =	pHead->next; 	while(tmp) { 		if(strcmp(tmp->car_num,	car_num)==0) { 			printf("车牌%s于%d月%d日%d时停入%d车位中\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, tmp->parking_position); 			press_return(); 			return; 		} 		tmp	= tmp->next; 	} 	printf("暂时没有此车信息.\n"); 	press_return(); } void daily_report()	{ 	int	month; 	int	day; 	printf("请输入要查询的日期.\n"); 	printf("如3月4日，则输入 3:4.\n"); 	scanf(" %d:%d", &month, &day); 	FILE *fp_in; 	FILE *fp_out; 	FILE *fp_report; 	remove(FILE_REPORT); 	fp_in =	fopen(FILE_IN_PATH,	"r"); 	fp_out = fopen(FILE_OUT_PATH, "r"); 	fp_report =	fopen(FILE_REPORT, "a+");   	fprintf(fp_report, "%d月%d日报表:\n", month, day); 	fflush(fp_report); 	if(fp_in==NULL)	{ 		fprintf(fp_report, "当日没有车停入\n"); 		fflush(fp_report); 	} else { 		int	f_month; 		int	f_day; 		char car_num[20]; 		int	count=0; 		while(fscanf(fp_in,"%d\t%d\t%s", &f_month, &f_day, car_num ) != EOF) { 			if((month==f_month)	&& (day==f_day)) { 				count++; 			} 		} 		if(count==0) { 			fprintf(fp_report, "当日没有车停入\n"); 			fflush(fp_report); 		} else { 			fprintf(fp_report, "当日驶入车 %d 辆\n", count); 			fflush(fp_report); 		} 	}  	if(fp_out==NULL) { 		fprintf(fp_report, "当日没有车驶出\n"); 		fprintf(fp_report, "当日收费 0 元\n"); 	} else { 		int	f_month; 		int	f_day; 		char car_num[20]; 		int	m_price; 		int	count=0; 		int	price =0; 		while(fscanf(fp_out,"%d\t%d\t%s\t%d", &month, &day, car_num, &price ) != EOF) { 			if((month==f_month)	&& (day==f_day)) { 				count++; 				price+=m_price; 			} 		} 		if(count==0) { 			fprintf(fp_report, "当日没有车驶出\n"); 			fflush(fp_report); 		} else { 			fprintf(fp_report, "当日驶出车 %d 辆\n", count); 			fprintf(fp_report, "当日收费 %d 元\n", price); 			fflush(fp_report); 		} 	} 	fclose(fp_report); 	press_return(); }  Compiling... err.cpp c:\tmp\tmp\err.cpp(173) : warning C4700: local variable 'park_hour' used without having been initialized c:\tmp\tmp\err.cpp(185) : warning C4700: local variable 'm_month' used without having been initialized c:\tmp\tmp\err.cpp(185) : warning C4700: local variable 'm_day' used without having been initialized c:\tmp\tmp\err.cpp(185) : warning C4700: local variable 'm_hour' used without having been initialized c:\tmp\tmp\err.cpp(398) : warning C4700: local variable 'f_month' used without having been initialized c:\tmp\tmp\err.cpp(398) : warning C4700: local variable 'f_day' used without having been initialized c:\tmp\tmp\err.cpp(400) : warning C4700: local variable 'm_price' used without having been initialized Linking...  tmp.exe - 0 error(s), 0 warning(s)

user: user-2
content: void clear_list() {     Node *tmp;     tmp = pHead->next;     while(tmp!=NULL)     {         pHead->next=tmp->next;         free(tmp);         tmp=pHead->next;     }     pHead->next = NULL;     p = pHead; }  void print_list() {     printf("当前停车:\n");     printf("车牌号 入场时间 停车位置 \n");     Node *tmp;     tmp = pHead->next;     while(tmp!=NULL)     {         printf("%s\t%d月%d日%d时\t%d\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, tmp->parking_position);         tmp = tmp->next;     } } int is_empty_list() {     if(pHead->next==NULL)     {         return 1;     }     return 0; }  void search_all() {     int i;     int count = 0;     for(i=0; i< PARKING_POSITION_NUM; i++)     {         if (parking_pos[i]==1)         {             count ++;             printf("车位 %d 已被使用\n", i+1);         }     }     printf("已经使用车位%d, 还剩下 %d\n", count, PARKING_POSITION_NUM-count); } void search_by_position() {     int pos;     printf("请输入查询的车位号: [1-%d]\n", PARKING_POSITION_NUM);     scanf(" %d", &pos);     if(parking_pos[pos-1]==1)     {         Node *tmp = pHead->next;         while(tmp)         {             if (pos==tmp->parking_position)             {                 printf("该车位正在被如下车使用\n");                 printf("车牌%s于%d月%d日%d时停入\n", tmp->car_num, tmp->month, tmp->day, tmp->hour);                 break;             }             tmp = tmp->next;         }     }     else     {         printf("该车位并没有使用.");     }     press_return(); } void search_by_number() {     char car_num[20];     printf("请输入需要查询的车牌号\n");     scanf(" %s", car_num);     Node *tmp = pHead->next;     while(tmp)     {         if(strcmp(tmp->car_num, car_num)==0)         {             printf("车牌%s于%d月%d日%d时停入%d车位中\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, tmp->parking_position);             press_return();             return;         }         tmp = tmp->next;     }     printf("暂时没有此车信息.\n");     press_return(); } void daily_report() {     int month;     int day;     printf("请输入要查询的日期.\n");     printf("如3月4日，则输入 3:4.\n");     scanf(" %d:%d", &month, &day);     FILE *fp_in;     FILE *fp_out;     FILE *fp_report;     remove(FILE_REPORT);     fp_in = fopen(FILE_IN_PATH, "r");     fp_out = fopen(FILE_OUT_PATH, "r");     fp_report = fopen(FILE_REPORT, "a+");       fprintf(fp_report, "%d月%d日报表:\n", month, day);     fflush(fp_report);     if(fp_in==NULL)     {         fprintf(fp_report, "当日没有车停入\n");         fflush(fp_report);     }     else     {         int f_month;         int f_day;         char car_num[20];         int count=0;         while(fscanf(fp_in,"%d\t%d\t%s", &f_month, &f_day, car_num ) != EOF)         {             if((month==f_month) && (day==f_day))             {                 count++;             }         }         if(count==0)         {             fprintf(fp_report, "当日没有车停入\n");             fflush(fp_report);         }         else         {             fprintf(fp_report, "当日驶入车 %d 辆\n", count);             fflush(fp_report);         }     }      if(fp_out==NULL)     {         fprintf(fp_report, "当日没有车驶出\n");         fprintf(fp_report, "当日收费 0 元\n");     }     else     {         int f_month;         int f_day;         char car_num[20];         int m_price;         int count=0;         int price =0;         while(fscanf(fp_out,"%d\t%d\t%s\t%d", &month, &day, car_num, &price ) != EOF)         {             if((month==f_month) && (day==f_day))             {                 count++;                 price+=m_price;             }         }         if(count==0)         {             fprintf(fp_report, "当日没有车驶出\n");             fflush(fp_report);         }         else         {             fprintf(fp_report, "当日驶出车 %d 辆\n", count);             fprintf(fp_report, "当日收费 %d 元\n", price);             fflush(fp_report);         }     }     fclose(fp_report);     press_return(); }

user: user-2
content: 问题如下： 1. 定义的全局变量tmp是int类型，在car_driver_out函数中直接运用成结构体指针。 2. 在car_driver_out函数中park_hour变量定义未初始化，直接运用； 3. print_main_menu函数未找到定义；可能是漏写了？ 总之，变量定义和使用有点乱，哪儿使用哪儿定义，没有事先规划好。程序建议还是先想好，分析好 建议if判断多于2个时，使用swich case

user: user-2
content: #include <stdio.h> #include <stdlib.h> #include <string.h>  #define PARKING_POSITION_NUM 100 #define FILE_CAR "car.txt" #define FILE_IN_PATH "car_in.txt" #define FILE_OUT_PATH "car_out.txt" #define FILE_REPORT "car_report.txt"  int parking_pos[PARKING_POSITION_NUM] = {0};  typedef struct car_list {     char car_num[20];     int month;     int day;     int hour;     int parking_position;     struct car_list *next; }Node;  Node *pHead, *p;  int get_user_operation(); int x; void car_drive_in(); void car_drive_out(); void search_all(); void search_by_position(); void search_by_number(); void daily_report(); void system_exit(); void press_return(); void write_to_file(); void read_from_file(); void clear_list(); void print_list(); int is_empty_list(); //int tmp; void record_car_in(Node *tmp); void record_car_out(int month, int day, char* car_num, int price);  int main() {     int x;     printf("\t\t\t***********************\n");     printf("\t\t\t*        主菜单       *\n");     printf("\t\t\t***********************\n");     printf("\t\t\t*1车辆驶入   2车辆驶出*\n");     printf("\t\t\t*3整理查询   4车位查询*\n");     printf("\t\t\t*5车牌查询   6日统计*\n");     printf("\t\t\t*7退出系统\n");     printf("\t\t\t    请选择[1/2/3/4/5/6/7]:");     scanf("%d",&x);      switch (x) {         case 1:             read_from_file();             car_drive_in();             break;          case 2:             car_drive_out();             break;          case 3:             search_all();             break;          case 4:             search_by_position();             break;          case 5:             search_by_number();             break;          case 6:             daily_report();             break;          case 7:             system_exit();             break;          default:             printf("Not support!\n");             break;     }     /*     if(x == 1) { read_from_file();car_drive_in();}     else if(x==2) car_drive_out();     else if(x==3) search_all();     else if(x==4) search_by_position();     else if(x==5) search_by_number();     else if(x==6) daily_report();     else if(x==7) system_exit();     */ } int get_user_operation() {     char ch;     while(1)     {         printf("请选择：");         scanf(" %c", &ch);         Node *tmp;         if (ch < '0' || ch > '7')         {             printf("输入有误,请重新输入.\n");             printf("\n");             //print_main_menu();         }         else         {             return ch - '0';         }     } }  void car_drive_in() {     int pos = -1;     int i;     Node *tmp;     tmp = (Node *)malloc(sizeof(Node));     printf("车辆驶入: \n");     print_list();     printf("请输入车牌号: \n");     printf("例如: s1656\n");     scanf(" %s", tmp->car_num);     printf("请输入驶入时间: \n");     printf("4月4号34点输入: 4:4:34\n");     scanf(" %d:%d:%d", &tmp->month, &tmp->day, &tmp->hour);     for(i = 0; i < PARKING_POSITION_NUM; i++ )     {         if( parking_pos[i] == 0 )         {             pos = i + 1;             parking_pos[i] = 1;             break;         }     }     if (pos == -1)     {         printf("车位已满，停车失败。 \n");         return;     }     tmp->parking_position = pos;     tmp->next = NULL;     p->next = tmp;     p = tmp;     record_car_in(tmp);     write_to_file();     printf("车辆进入停车场成功,时间已经自动载入!:\n");     printf("车牌为%s的汽车驶入时间为:%d月%d日%d时停在%d车位\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, pos);     press_return(); }  void car_drive_out() {     Node *tmp = NULL;     char car_num[20];     if (is_empty_list() == 1)     {         printf("当前停车场没有车.\n");         press_return();         return;     }     print_list();     printf("车辆驶出: \n");     printf("请输入车牌号：\n");     scanf(" %s", car_num);     if (pHead)         tmp = pHead->next;     else         tmp = NULL;     while(tmp!=NULL)     {         int m_month;         int m_day;         int m_hour;         int sum=0;         int park_hour;         int day_hour = park_hour % 24;         int park_day = (park_hour - day_hour) / 24;         if(day_hour >= 8)             if(strcmp(tmp->car_num, car_num)==0)             {                 /*                 struct time;                 {                     int month;                     int day;                     int hour;                 }                 */                 int park_hour = (m_month - tmp->month) * 30 * 24 + (m_day - tmp->day) * 24 + (m_hour - tmp->hour);                 printf("请输入取车时间：\n");                 printf("4月4号44点输入: 4:4:44\n");                 scanf(" %d:%d:%d", &m_month, &m_day, &m_hour);                 if (park_hour < 0)                 {                     {                         printf("错误的输入时间.");                         press_return();                         return;                     }                     {                         sum=(park_day + 1) * 8;                     }                 }                 else                 {                     sum = park_day * 8 + day_hour * 1;                 }                 parking_pos[tmp->parking_position-1] = 0;                 // 清空当前车                 p->next = tmp->next;                 free(tmp);                 printf("请交纳停车费： %d \n", sum);                 record_car_out(m_month, m_day, car_num, sum);                 return;             }         tmp = tmp->next;         p = p->next;         write_to_file();     }     printf("查无此车.\n");     press_return(); } void system_exit() {     printf("程序退出\n");     exit(0); } void press_return() {     while(1)     {         printf("按下 r 返回主菜单.\n");         char ch;         scanf(" %c", &ch);         if (ch == 'r')         {             return;         }     } } void write_to_file() {     FILE *fp;     remove(FILE_CAR);     fp = fopen(FILE_CAR, "w");     Node *tmp = pHead->next;     while(tmp)     {         fprintf(fp, "%s\t%d\t%d\t%d\t%d\n", tmp->car_num, tmp->month, tmp->day, tmp->hour, tmp->parking_position);         tmp = tmp->next;     }     fflush(fp);     fclose(fp); } void record_car_in(Node *tmp) {     FILE *fp;     fp = fopen(FILE_IN_PATH, "a+");     fprintf(fp, "%d\t%d\t%s\n", tmp->month, tmp->day, tmp->car_num);     fflush(fp);     fclose(fp); }  void record_car_out(int month, int day, char* car_num, int price) {     FILE *fp;     fp = fopen(FILE_OUT_PATH, "a+");     fprintf(fp, "%d\t%d\t%s\t%d\n", month, day, car_num, price);     fflush(fp);     fclose(fp); } void read_from_file() {     clear_list();     FILE *fp;     fp = fopen(FILE_CAR, "r");     if (fp == NULL)     {         return;     }     p = pHead;     Node *tmp;     tmp = (Node *)malloc(sizeof(Node));     while(fscanf(fp,"%s\t%d\t%d\t%d\t%d", tmp->car_num, &tmp->month, &tmp->day, &tmp->hour, &tmp->parking_position) != EOF)     {         tmp->next = NULL;         p->next = tmp;         p = tmp;         parking_pos[tmp->parking_position -1] = 1;         tmp = (Node *)malloc(sizeof(Node));     } }

user: user-3
content: 用C语言来做这个停车管理系统，有点复杂了吧。

user: user-1
content: 代码功能归根结底不是别人帮自己看或讲解或注释出来的；而是被自己静下心来花足够长的时间和精力亲自动手单步或设断点或对执行到某步获得的中间结果显示或写到日志文件中一步一步分析出来的。 提醒：再牛×的老师也无法代替学生自己领悟和上厕所！ 单步调试和设断点调试（VS IDE中编译连接通过以后，按F10或F11键单步执行，按Shift+F11退出当前函数；在某行按F9设断点后按F5执行停在该断点处。）是程序员必须掌握的技能之一。

user: user-0
content: --------------------Configuration: dguvgd - Win32 Debug-------------------- Compiling... scs.c F:\jhu\dguvgd\scs.c(70) : warning C4013: 'print_main_menu' undefined; assuming extern returning int F:\jhu\dguvgd\scs.c(61) : warning C4101: 'tmp' : unreferenced local variable F:\jhu\dguvgd\scs.c(131) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct car_list *' F:\jhu\dguvgd\scs.c(132) : warning C4047: '!=' : 'int ' differs in levels of indirection from 'void *' F:\jhu\dguvgd\scs.c(142) : error C2223: left of '->car' must point to struct/union F:\jhu\dguvgd\scs.c(142) : error C2198: 'strcmp' : too few actual parameters F:\jhu\dguvgd\scs.c(150) : error C2143: syntax error : missing ';' before 'type' F:\jhu\dguvgd\scs.c(169) : error C2223: left of '->parking_position' must point to struct/union F:\jhu\dguvgd\scs.c(169) : fatal error C1903: unable to recover from previous error(s); stopping compilation Error executing cl.exe.  scs.obj - 5 error(s), 4 warning(s)

user: user-0

user: user-0
content: 我们用的这个编译器。错误gengduol