我的理解是 memcpy 必须有 3 个参数:
void * memcpy ( void * destination, const void * source, size_t num );
所以我正在尝试这段代码:
//char *tmpPtr is a pointer that points to some data
char frameBuffer[921600]; //destination starting a given index
int bufferIndex;//the given index
memccpy(frameBuffer+bufferIndex,tmpPtr,Data.size()-1);
但我收到此错误:
error: too few arguments to function `void * memccpy (void *, const void *, int, size_t)
最佳答案
错别字:
memccpy
^^
你调用了错误的函数。
memccpy
还接受一个字符(作为 int
参数),遇到该字符应停止复制。
关于c++ - 函数参数太少 ‘memcpy’,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14224857/