Int arrays in Objective-C

So, I have this:

int a[4] = { 0, 1, 2, 3 };

And then I want to create a new int array:

int b[4];

What is the easiest way to do b [] = a []?

+3
source share
1 answer
memcpy(b, a, sizeof(int) * 4);
+6
source

Source: https://habr.com/ru/post/1744681/


All Articles