char* Mystrcpy(char* strDest,const char* strSrc)
{
int length=0;
const char *temp = strSrc;
while(*temp!='\0')
{
temp++;
length++;
}
char *temp2 = strDest;
while(*temp2!='\0')
{
*temp2 = '\0';//这边就中断了
temp2++;
}
for(int i=0 ;i<length; i++)
{
strDest[i] = strSrc[i];
}
return strDest;
}
想请问为什么到那边会中断呢? 我只是想要赋值而已呀....