关于形参永字符指针变量不知道怎么编译出错了,求大神看一下
#include <stdio.h>void main()
{
void copy_string(char from[],char to[]);
char from[]="I am a teacher.";
char to[]="You are a student.";
char *a=from,*b=to;
printf("string a=%s\nstring b=%s\n",a,b);
printf("copy string a to string b:\n");
copy_string(a,b);
printf("string a=%s\nstring b=%s\n",a,b);
}
void copy_string(char *from,char *to)
{
for(;*from!='\0';from++,to++)
*to=*from;
*to='\0';
}