error: too few arguments to function `void* memccpy(void*, const void*, int, size_t),我试了试memccpy(sub2, hold, 101, sizeof(char));这种用法,但似乎错了啊。
sorry 才发现...更正一下
用memccpy(sub2, hold, 101 * sizeof(char));就得到编译错误error: too few arguments to function `void* memccpy(void*, const void*, int, size_t),
我试了试memccpy(sub2, hold, 101, sizeof(char));这种用法,但用不太来,这种四参数的memccpy是标准的吗?
求指教,谢谢~~
为什么c-free中memcpy函数要4个参数啊!?求大神告诉我用法...
答案:2 悬赏:0
解决时间 2021-02-22 14:51
- 提问者网友:情系雨樱花
- 2021-02-22 09:05
最佳答案
- 二级知识专家网友:魅世女王
- 2021-02-22 09:16
原型:extern void *memccpy(void *dest, void *src, unsigned char c, unsigned int count);
参数:
dest Pointer to the destination.
src Pointer to the source.
c Last character to copy.
count Number of characters.
用法:#include
功能:由src所指内存区域复制不多于count个字节到dest所指内存区域,如果遇到字符c则停止复制。
返回值:如果c没有被复制,则返回NULL,否则,返回一个指向紧接着dest区域后的字符的指针。
这个函数一般不怎么常用。
参数:
dest Pointer to the destination.
src Pointer to the source.
c Last character to copy.
count Number of characters.
用法:#include
功能:由src所指内存区域复制不多于count个字节到dest所指内存区域,如果遇到字符c则停止复制。
返回值:如果c没有被复制,则返回NULL,否则,返回一个指向紧接着dest区域后的字符的指针。
这个函数一般不怎么常用。
全部回答
- 1楼网友:厭世為王
- 2021-02-22 09:23
期待看到有用的回答!
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯