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?

1 Answer

You likely forgot to include <string.h>.

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

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJoaG5pZGl%2FeIKOnqmrp6JixKK%2BzaKloGWZo7Cwuc%2Baq6KanJp6qrnPpaCcoaRisaavy5qpmqyZpLtuu8Vmma6hnKl6qrqMn6ynm6SevK95zJ6knKip