Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
nv3 29-Jul-13 4:54am    
Does this code sit outside of any function? Then it doesn't call memcpy, but looks to the compiler as if you were trying to declare your own function memcpy.

1 solution

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

C++
#include <string.h>


http://msdn.microsoft.com/en-us/library/dswaw1wk(v=vs.80).aspx[^]
 
Share this answer
 
v2
Comments
CPallini 29-Jul-13 5:16am    
5.
GiZmoDragonBack 29-Jul-13 5:52am    
Indeed, the problem was that I was including strings.h and not string.h

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900