开发者

Int arrays in Objective-C

开发者 https://www.devze.com 2022-12-30 04:12 出处:网络
So I have this: int a[4] = { 0, 1, 2, 3 }; And then I want to make a new int array: int b[4]; What is the easiest way to make开发者_运维百科 b[] = a[]?memcpy(b, a, sizeof(int) * 4);

So I have this:

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

And then I want to make a new int array:

int b[4];

What is the easiest way to make开发者_运维百科 b[] = a[]?


memcpy(b, a, sizeof(int) * 4);
0

精彩评论

暂无评论...
验证码 换一张
取 消