C警告 - 内置函数'memcpy'的不兼容隐式声明[默认启用] [英] C Warning - incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]

查看:701
本文介绍了C警告 - 内置函数'memcpy'的不兼容隐式声明[默认启用]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





出于某种原因,我发出警告内置函数'memcpy'的不兼容隐式声明[默认启用]



代码简单如下



 void * p_TelecommandData //这是一个输入变量
OBCP_PLAN_ID_T t_PlanId;
memcpy((void *)& t_PlanId,p_TelecommandData,sizeof(OBCP_PLAN_ID_T));





我包括

 strings.h 





感谢您的帮助

解决方案

假设您正在使用MSVC - 如果您查看文档,您将看到您需要



  #include   <   string.h  >   





http://msdn.microsoft.com/en-us/library/dswaw1wk(v = VS.80 ).aspx [ ^ ]


Hi,

For some reason I am having the warning incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]

The code is as simple as

void* p_TelecommandData // This is an input variable
OBCP_PLAN_ID_T t_PlanId;
memcpy((void*)&t_PlanId, p_TelecommandData, sizeof(OBCP_PLAN_ID_T));



I am including

strings.h



Thanks for your help

解决方案

Assuming you are using MSVC - If you check the documentation you will see that you need

#include <string.h>



http://msdn.microsoft.com/en-us/library/dswaw1wk(v=vs.80).aspx[^]


这篇关于C警告 - 内置函数'memcpy'的不兼容隐式声明[默认启用]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆