急:求助c++问题
char* str1="56789"; char* str2="123456789";
strcpy(str1,str2);
cout < <str1 < <endl;
cout < <str2 < <endl;
在debug模式下编译正常,但运行出错;
在release模式下,能正常运行;
答案是:123456789和9.
请高手们分析一下这个结果!!
在线等待……
2008-11-11 21:54
2008-11-12 13:41
2008-11-12 16:06
2008-11-12 17:37
2008-11-12 21:37
2008-11-12 22:33
2008-11-12 22:50
2008-11-12 23:28
2008-11-12 23:38
2008-11-12 23:44