字符复制函数,程序出错,百度说改个参数就好,不知怎么改,求指点
#include<stdio.h>char *mystrcpy(char *src,char *des)
{
char *p=des;
while((*src++=*des++)!='\0')
return p;
}
int main()
{
char *str="adbcdd";
char str1[15];
mystrcpy(str1,str);
printf("%s",str1);
return 0;
}
这是出错的问题deprecated conversion from string constant to 'char*' [-Wwrite-strings]