>第 24 章 函数接口" 添加成功>本章的预备知识

码匠 code_smith@sohu.com
2009-09-30 12:03:31

"是有指针参数的C标准库函数基本上都有这条要求,每个指针参数所指向的内存空间互不重叠,例如这样调用是不允许的:

char buf[10] = "hello";
strcpy(buf, buf+1);"


I think the words here is not accurate. Acctaully such code is allowed when it is compiled using gcc and can run well. 

What do you think


宋劲杉 songjinshan@akaedu.org
2010-01-21 16:45:28

在你机器上能正确运行并不等于它就是对的。看了下一章你就明白了。


如果您有建设性意见,哪怕只是纠正一个错别字,也请不吝赐教,您留下的姓名和email将会出现在本书前言的致谢中。再次感谢您的宝贵意见!