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);
精彩评论