J
jack
hello all,
how to do a memcpy to a structure from an integer (uint32)
struct temp_t *y;
uint32 x = 0x12345677;
I have to assign this address to a structure through memcpy
I tried in the following way
memcpy(y , (temp_t*)x , sizeof(x));
but it doesn't work ? How to solve this ?
what if If i do in the following way: y = (temp_t*)x;
Thank you for any help
how to do a memcpy to a structure from an integer (uint32)
struct temp_t *y;
uint32 x = 0x12345677;
I have to assign this address to a structure through memcpy
I tried in the following way
memcpy(y , (temp_t*)x , sizeof(x));
but it doesn't work ? How to solve this ?
what if If i do in the following way: y = (temp_t*)x;
Thank you for any help