Memcpy no error was declared in eclipse CDT C ++

I am trying to execute memcpy

char *pdata = data pointer; int64_t deviceId; memcpy(&deviceId, pdata+1, 8); 

And he complains that "memcpy has not been declared in this area"

I have included below library in header file

 <stdio.h> <stdlib.h> <unistd.h> 

How to fix this problem. Thanks in advance.

+7
source share
2 answers

mempcy defined in string.h , excerpt from man:

  SYNOPSIS #include <string.h> void * memcpy(void *restrict s1, const void *restrict s2, size_t n); 
+17
source
+2
source

All Articles