很多资料的字符串拷贝函数是这样的:<br /><br />char *strcpy(char *destination, const char *source) <br />{ <br /> while(*destinaton++=*source++); <br /> return (destination-1); <br />} <br /><br />我的疑问是返回值不应该是destination-1,因为这个值是指向字符串的最后一个元素,我觉得应该返回destination-strlen(destination),这样才能将字符串首地址返回,烦请高人指教。 |
|