计算机二级C语言
#include<stdio.h>#include<string.h>
void fun(char *P,char *q,char *c)
{
int k=0;
while(*p||*q)
{
if(*p<*q) c=*q;
else c=*p;
if(*p) p++;
if(*q) q++;
k++;
}
}
main()
{
char a="aBCDeFgH",b="ABcd",c={'\0'};
fun(a,b,c);
printf("The string a:");
puts(a);
printf("The string b:");
puts(b);
printf("The string c:");
puts(c);
return 0;
}
--------------------Configuration: 2018.3 - Win32 Debug--------------------
Compiling...
2018.3.c
G:\Computer Secondary C language\Program error correction problem\2018.3.c(6) : error C2065: 'p' : undeclared identifier
G:\Computer Secondary C language\Program error correction problem\2018.3.c(6) : error C2100: illegal indirection
G:\Computer Secondary C language\Program error correction problem\2018.3.c(8) : error C2100: illegal indirection
G:\Computer Secondary C language\Program error correction problem\2018.3.c(10) : error C2100: illegal indirection
G:\Computer Secondary C language\Program error correction problem\2018.3.c(11) : error C2100: illegal indirection
执行 cl.exe 时出错.
2018.3.obj - 1 error(s), 0 warning(s)
请各位大神帮帮忙 void fun(char *p,char *q,char *c)//打成大写了 claws0n 发表于 2018-9-8 13:54
void fun(char *p,char *q,char *c)//打成大写了
谢谢
页:
[1]