gpt4 book ai didi

c - 错误 : warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]

转载 作者:太空狗 更新时间:2023-10-29 16:19:13 25 4
gpt4 key购买 nike

我收到这个错误。

error: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]

这是代码:

int arr[ 12] = {1,0,0,0,0,0,0,0,0,0,9370, 0};
void *a = &arr;
memcpy(machine->mem, a,12*4);

我做错了什么?

最佳答案

您可能忘记包含 <string.h> .

添加#include <string.h>到文件的顶部。

关于c - 错误 : warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15144276/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com