55

I get this error.

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

This is the code:

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

What I am doing wrong?

cnicutar
  • 178,505
  • 25
  • 365
  • 392
user2073729
  • 1,151
  • 4
  • 10
  • 16

1 Answers1

113

You likely forgot to include <string.h>.

Add #include <string.h> to the top of your file.

Keith Thompson
  • 254,901
  • 44
  • 429
  • 631
cnicutar
  • 178,505
  • 25
  • 365
  • 392