请大家帮我看看我的这道程序这里为什么会出错?要怎么改?#includevoid main(){void fun(char *s1,char *s2);char *a1,*a2;gets(a1);fun(a1,a2);printf("%s \n%s \n",a1,a2);}void fun(char *s1,char *s2){int i,j;for(i=0;*s1[i]!='\0';i++); /
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/21 02:49:26
请大家帮我看看我的这道程序这里为什么会出错?要怎么改?#includevoid main(){void fun(char *s1,char *s2);char *a1,*a2;gets(a1);fun(a1,a2);printf("%s \n%s \n",a1,a2);}void fun(char *s1,char *s2){int i,j;for(i=0;*s1[i]!='\0';i++); /
请大家帮我看看我的这道程序这里为什么会出错?要怎么改?
#include
void main()
{void fun(char *s1,char *s2);
char *a1,*a2;
gets(a1);
fun(a1,a2);
printf("%s \n%s \n",a1,a2);
}
void fun(char *s1,char *s2)
{int i,j;
for(i=0;*s1[i]!='\0';i++); //(invalid indirection)
for(j=0;i!=0;j++,i--) //(invalid indirection)
*s2[j]=*s1[i];} //(invalid indirection)
请大家帮我看看我的这道程序这里为什么会出错?要怎么改?#includevoid main(){void fun(char *s1,char *s2);char *a1,*a2;gets(a1);fun(a1,a2);printf("%s \n%s \n",a1,a2);}void fun(char *s1,char *s2){int i,j;for(i=0;*s1[i]!='\0';i++); /
编译错误提示什么?