c语言出错
c语言出错First-chance exception in dongtai.exe: 0xC0000005: Access Violation.
这是什么意思啊?
怎么解决?
谢谢了~
我也遇见此类问题源码如下:
void Copy_String(char from[], char to[])
{
int i=0;
while ((*from) !='\0')
{
*to = *from;
to++;
from++;
}
*to = '\0';
}
void CompeteFunction()
{
char *a = "I am a teacher.";
char *b = "you are a student.";
printf("string a = %s\n string b = %s\n",a,b);
printf("copy string a to string b:\n");
Copy_String(a,b);
printf("string a = %s\n string b = %s\n",a,b);
}
希望大侠们能指点一二, 先谢过了