一个很小的问题
#include <iostream.h>
int stringcpy(char *s,char *t)
{
int i;
int len;
s[len]=t[len];
for(i=0;t[i]!='\0';i++)
{
s[i]=t[i];
s++;
t++;
*s=*t;
}
s[i]='\0';
}
main()
{
char string[80];
char str[80];
cout<<"string:";
cin>>string;
stringcpy(str.string);
cout<<"str:"<<str<<endl;
}
编译运行出错,出错提示:017f:00401247 的模块strcpy.exe中导致无效的页错误。