What I am trying:
BYTE test[] = {0x00,0x00,0x00,0x00};
*(test+1) = 0xFFFF;
What I get:
00000000 11111111 00000000 00000000
What I expect or want to achieve:
00000000 11111111 11111111 00000000
Background: In one part of my program I need to insert a WORD into a part of an array. Yes, normally I could just do
*(test+1) = 0xFF;
*(test+2) = 0xFF;
but I wonder if there is a possibility to do this as a one-liner like in the first example. Memcpy is no option here since I would need to allocate space for a second array.