|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include<stdio.h>
#include<string.h>
void fun(char *P,char *q,char *c)
{
int k=0;
while(*p||*q)
{
if(*p<*q) c[k]=*q;
else c[k]=*p;
if(*p) p++;
if(*q) q++;
k++;
}
}
main()
{
char a[10]="aBCDeFgH",b[10]="ABcd",c[80]={'\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) //打成大写了
|
|