- 论坛徽章:
- 0
|
本帖最后由 langue 于 2010-07-20 00:11 编辑
总的说来,copy在这里是照抄的意思,duplicate是生成一份复制品。
DESCRIPTION
The strcpy() function copies the string pointed to by src (including
the terminating '\0' character) to the array pointed to by dest. The
strings may not overlap, and the destination string dest must be large
enough to receive the copy. [1]
The strdup() function returns a pointer to a new string which is a
duplicate of the string s. Memory for the new string is obtained with
malloc(3), and can be freed with free(3). [2]
From WordNet (r) 2.0 :
copy
v 1: copy down as is; "The students were made to copy the
alphabet over and over" [3]
duplicate
v. 3: make a duplicate or duplicates of; "Could you please
duplicate this letter for me?" [3]
duplicate
n 1: something additional of the same kind; "he always carried
extras in case of an emergency" [syn: extra]
2: a copy that corresponds to an original exactly; "he made a
duplicate for the files" [syn: duplication] [3]
Reference:
[1] strcpy(3)
[2] strdup(3)
[3] http://www.dict.org/bin/Dict |
|