65,184
社区成员




#include <iostream>
using namespace std;
char* strcpy_(char* strDest,const char* strSrc)
{
if (strDest==NULL || strSrc == NULL)
{
return 0;
}
char *strDestCopy = strDest;
while ((*strDest++ = *strSrc++) != '\0')
{
;
}
cout<<strSrc<<endl;// adf
cout<<strDestCopy<<endl;// 123
return strDestCopy;
}
int main()
{
char a[10]="adf";
strcpy_(a,"123");
return 0;
}