int x[10],y[10];
x = y;
I am thinking of a simple hack, which would enable me to get this effect.
int x[10],y[10];
x = y;
I am thinking of a simple hack, which would enable me to get this effect.
You need to use memcpy
(or memmove
) to transfer a block of memory.
memcpy(x, y, sizeof(x));
Use memcpy(), or copy it yourself with a for(i=0;i<10;i++) loop
You can wrap them in struct
s to use simple assignment:
struct foo { int a[10]; } x, y;
x = y;
But really, just use memcpy
.