user-0 提问: 简单的小菜单功能实现！

回复:
user: user-0
content: 引用 3 楼 user-1 的回复:http://www.bianceng.cn/Programming/C/201501/47575.htm  [quote=引用 4 楼 user-1 的回复:] 函数声明和函数定义不一致   万分感谢！

user: user-1
content: 函数声明和函数定义不一致   #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h>    #define HONG 10 #define LIE 80  void output(int n ,char (*max)[LIE]); void ASCII_code_output(int n ,char (*max)[LIE]); void Sequence_output(int n ,char (* max)[LIE],int p); void output_string(int n ,char (* max)[LIE]);  int prinf_max(void) { 	int i = 0; 	puts("+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+"); 	puts("1. Output string list."); 	puts("2. ASCII code output string."); 	puts("3. Sequence output string by length."); 	puts("4. Output string by the length of the first word in the string."); 	puts("5. quit!"); 	puts("+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+"); 	while (!(i!=0)) 	{ 		printf("Please enter your choice 1-5："); 		scanf("%d", &i); 		getchar(); 	}  	return i; }  int main() { 	int ch=0; 	int i = 0, number = 0; 	char max[HONG][LIE] = { 0 }; 	char (*p)[LIE] = max;  	printf("Enter the 10 strings, confirm that please press enter\n"); 	while (i< HONG) 	{ 		printf("max [%d] = Continue input: ", i); 		gets(p[i++]);   		number = prinf_max(); 		if (number == 5) 		{ 			puts("Quit!"); break; 		} 		while (number > 5 || number < 0) 		{ 			puts("Invalid input!"); 			prinf_max(); 			system("cls"); 		} 		switch (number) 		{ 		case 1:output(i,max); break; 		case 2:ASCII_code_output(i-1,max); break; 		case 3:Sequence_output(i-1,max,strlen(max[i-1])); break; 		case 4:output_string(i - 1, max); break; 		} 	}  	return 0; }  void output(int n ,char (*max)[LIE]) { 	static int x = 0; 	int *p = &x; 	puts("----------------------------------"); 	for (; x < n; (*p)++) 	{ 		printf("Output string list: max [%d] =  %s\n", x, (max + x)); 	} 	puts("----------------------------------"); } void ASCII_code_output(int n ,char (*max)[LIE]) { 	int i = 0, x = 0;  	while (*(*(max+n)+i)) 	{ 		if (*(*(max + n) + i) >= 'A'&&*(*(max + n) + i) <= 'Z' || 			*(*(max + n) + i) >= 'a'&&*(*(max + n) + i) <= 'z') 		{ 			x = i; 			x++; 			while (*(*(max + n) + x) != '\0') 			{ 				if (*(*(max + n) + x) != ' ') 				{ 					if (*(*(max + n) + i) < *(*(max + n) + x)) 					{ 						char tmp = *(*(max + n) + i); 						*(*(max + n) + i) = *(*(max + n) + x); 						*(*(max + n) + x) = tmp; 					} 				} 				x++; 			} 		} 		i++; 	} 	puts("----------------------------------"); 	printf("ASCII code output string: max[%d]=", n); 	puts(*(max + n)); 	puts("----------------------------------"); } void Sequence_output(int n ,char (* max)[LIE],int p) { 	int x, y; 	puts("----------------------------------"); 	for (x = 0; x < p; x++) 	{ 		for (y = 0; y <= x; y++) 		{ 			putchar(*(*(max + n) + y)); 		} 		printf("\n"); 	} 	puts("----------------------------------"); } void output_string(int n ,char (* max)[LIE]) { 	int i = 0; 	puts("----------------------------------"); 	printf("Output string by the length of the first word in the string:"); 	while (*(*(max + n) + i)) 	{ 		if (*(*(max + n) + i) != ' ') 		{ 			putchar(*(*(max + n) + i)); 		} 		if (*(*(max + n) + i++) == ' ') 		{ 			break; 		} 	} 	printf("\n"); 	puts("----------------------------------"); }

user: user-1
content: http://www.bianceng.cn/Programming/C/201501/47575.htm

user: user-0
content: 引用 1 楼 wzj3514 的回复:我可以做的，我的 qq 114122360 我是要自己写！