第六行老是出现警告,求大家帮忙看看
#include <stdio.h>#include <string.h>
int main()
{
void copy_string(char *from,char *to);
char *string1="I am a teacher";
char b[]="you are a student";
char *p=b;
printf("string a=%s\nstring b=%s\n",string1,b);
printf("\ncopy string a to string b");
copy_string(string1,p);
printf("string a=%s\nstring b=%s\n",string1,b);
return 0;
}
void copy_string(char *from,char *to)
{
for(;* from!='\0';from++,to++)
*to=*from;
*to='\0';
}
求大佬指教