user-0 提问:  local function definitions are illegal求解

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

user: user-1
content: 偶遇到类似问题都是用 “每次用/*...*/注释掉不同部分再重新编译，直到定位到具体语法出错的位置。” 的方法解决的。

user: user-2
content: 1.有个函数少了一个括号 2.main函数里L=Arrage(L);应该是L=Arrange(L); 3.InputData函数你没有return值  #include<stdio.h> #include<string.h> #define MaxSpace 100 #define keylen 7 #define RADIX_n 10 #define RADIX_c 26 typedef char KeyType; typedef struct{ 	char start[7]; 	char end[7]; 	char sche[12]; 	char time1[5]; 	char time2[5]; 	char model[3]; 	int price; }InfoType; typedef struct{ 	KeyType keys[keylen]; 	InfoType others; 	int next; }SLNode; typedef struct{ 	SLNode sl[MaxSpace]; 	int keynum; 	int length; }SLList; typedef int ArrType_n[RADIX_n]; typedef int ArrType_c[RADIX_c]; void Display(SLList L, int i);  void Distribute(SLNode *sl, int i, ArrType_n f, ArrType_n e) { 	int j, p; 	for (j = 0; j < RADIX_n; j++) 	{ 		f[j] = 0; 		e[j] = 0; 	} 	for (p = sl[0].next; p; p = sl[p].next) 	{ 		j = sl[p].keys[i] % 48; 		if (!f[j]) 			f[j] = p; 		else 			sl[e[j]].next = p; 		e[j] = p; 	} }  void Collect(SLNode *sl, int i, ArrType_n f, ArrType_n e) { 	int j, t; 	for (j = 0; !f[j]; j++); 	sl[0].next = f[j]; 	t = e[j]; 	while (j < RADIX_n - 1) 	{ 		for (j = j + 1; j < RADIX_n - 1 && !f[j]; j++); 		if (f[j]) 		{ 			sl[t].next = f[j]; 			t = e[j]; 		} 	} 	sl[t].next = 0; }  void Distribute_c(SLNode *sl, int i, ArrType_n f, ArrType_c e) { 	int j, p; 	for (j = 0; j < RADIX_c; j++) 	{ 		f[j] = 0; 		e[j] = 0; 	} 	for (p = sl[0].next; p; p = sl[p].next) 	{ 		j = sl[p].keys[i] % 65; 		if (!f[j]) 			f[j] = p; 		else 			sl[e[j]].next = p; 	} }  void Collect_c(SLNode *sl, int i, ArrType_n f, ArrType_c e) { 	int j, t; 	for (j = 0; !f[j]; j++); 	sl[0].next = f[j]; 	t = e[j]; 	while (j < RADIX_c - 1) 	{ 		for (j = j + 1; j < RADIX_c - 1 && !f[j]; j++); 		if (f[j]) 		{ 			sl[t].next = f[j]; 			t = e[j]; 		} 	} 	sl[t].next = 0; }  SLList RadixSort(SLList L) { 	int i; 	ArrType_n fn, en; 	ArrType_n fc, ec; 	for (i = 0; i < L.length; i++) 		L.sl[i].next = i + 1; 	L.sl[L.length].next = 0; 	for (i = L.keynum - 1; i >= 2; i--) 	{ 		Distribute_c(L.sl, i, fn, en); 		Collect_c(L.sl, i, fn, en); 	} 	for (i = 1; i >= 0; i--) 	{ 		Distribute_c(L.sl, i, fc, ec); 		Collect_c(L.sl, i, fc, ec); 		return L; 	} } SLList Arrange(SLList L) { 	int p, q, i; 	SLNode temp; 	p = L.sl[0].next; 	for (i = 1; i < L.length; i++) 	{ 		while (p < i) 			p = L.sl[p].next; 		q = L.sl[p].next; 		if (p != i) 		{ 			temp = L.sl[p]; 			L.sl[p] = L.sl[i]; 			L.sl[i] = temp; 			L.sl[i].next = p; 		} 		p = q; 	} 	return L; }  int BinSearch(SLList L, KeyType key[]) { 	int low, high, mid; 	low = 1; high = L.length - 1; 	while (low <= high){ 		mid = (low + high) / 2; 		if (strcmp(key, L.sl[mid].keys) == 0) 			return mid; 		else if (strcmp(key, L.sl[mid].keys) < 0) 			high = mid - 1; 		else 			low = mid + 1; 	} 	return 0; }  void SeqSearch(SLList L, KeyType key[], int i) { 	int j, k, m = 0; 	for (j = 1; j < L.length; j++) 	{ 		switch (i){ 		case 2:k = strcmp(key, L.sl[j].others.start); break; 		case 3:k = strcmp(key, L.sl[i].others.end); break; 		case 4:k = strcmp(key, L.sl[i].others.time1); break; 		case 5:k = strcmp(key, L.sl[i].others.time2); break; 		} 		if (k == 0){ 			m = 1; 			Display(L, j); 		} 	} 	if (m == 0) 		printf("无此航班的信息，可能是输入错误！！！\n"); }  void Display(SLList L, int i) { 	if (i == 0) 		printf("无此航班信息，可能是输入错误！！！\n"); 	else{ 		printf("航班号 起点站 终点站 航班期	起飞时间 到达时间 机型 票价\n"); 		printf("%s,%s,%s,%s,%s,%s,%s,%d\n", L.sl[i].keys, 			L.sl[i].others.start, L.sl[i].others.end, L.sl[i].others.sche, 			L.sl[i].others.time1, L.sl[i].others.time2, L.sl[i].others.model, 			L.sl[i].others.price); 	} }  void serachcon(SLList L) { 	int i = 1, k; 	KeyType key[keylen], kl[4]; 	while (i >= 1 && i <= 5){ 		printf("********************************\n"); 		printf("****	航班信息查询系统	****\n"); 		printf("********************************\n"); 		printf("****	1.  航 班 号	****\n"); 		printf("****	2.  起 点 站	****\n"); 		printf("****	3.  终 点 站	****\n"); 		printf("****	4.  起飞时间	****\n"); 		printf("****	5.  到达时间	****\n"); 		printf("****	0.  退出系统	****\n"); 		printf("********************************\n"); 		printf("	请选择（0~5）："); 		scanf("%d", &i); 		switch (i){ 		case 1:printf("输入要查询的航班号（字母要大写）："); 			scanf("%s", key); 			k = BinSearch(L, key); 			Display(L, k); 			break; 		case 2:printf("输入要查询的航班起点站名："); 			scanf("%s", key); 			SeqSearch(L, key, i); 			break; 		case 3:printf("输入要查询航班的终点站名："); 			scanf("%s", key); 			SeqSearch(L, key, i); 			break; 		case 4:printf("输入要查询航班起飞时间："); 			scanf("%s", kl); 			SeqSearch(L, kl, i); 			break; 		case 5:printf("输入要查询航班到达时间："); 			scanf("%s", kl); 			SeqSearch(L, kl, i); 			break; 		case 0:printf("再见！！！\n"); 			return; 		} 	} }  SLList InputData(SLList L) { 	int i = ++L.length; 	char yn = 'y'; 	while (yn == 'y' || yn == 'Y') 	{ 		printf("航班号 起点站 终点站 航班期	起飞时间 到达时间 机型 票价\n"); 		printf("%s%s%s%s%s%s%s%d\n", L.sl[i].keys, 			L.sl[i].others.start, L.sl[i].others.end, L.sl[i].others.sche, 			L.sl[i].others.time1, L.sl[i].others.time2, L.sl[i].others.model, 			L.sl[i].others.price); 		++i; 		printf("继续输入吗？y\n"); 		getchar(); 		scanf("%c", &yn); 	} 	L.length = i - 1; 	return L; }  void main() { 	int i, k; 	SLList L; 	L.keynum = 6; 	L.length = 0; 	for (i = 1; i <= L.length; i++) 		Display(L, i); 	L = InputData(L); 	L = RadixSort(L); 	L = Arrange(L); 	serachcon(L); 	return; }

user: user-3
content: SLList RadixSort(SLList L) 函数最后少了大括号 }

user: user-0
content: 为什么可以编译链接了，但出现了这个情况