【发布时间】:2013-10-02 12:12:57
【问题描述】:
我在谷歌找不到任何明确的来源,所以我决定在这里问。
c++ 中的函数 strncpy 和 _tcsncpy 接受 3 个参数:destination、source 和 nCount。
我不清楚第三个参数 nCount 是什么。是要复制的字符数还是缓冲区大小(以字节为单位)?
【问题讨论】:
-
count - maximum number of characters to copy。 copy/pasted from here。我真的只是用谷歌搜索了“strncpy”。 -
谷歌搜索“strncpy 参考”一无所获?真的吗? this 怎么样?
-
这很容易被谷歌回答。