Quote Originally Posted by GCDEF View Post
Nothing in your first example will copy data to your struct.
You are correct - I missed entering this in the above example: memcpy(&hdr, buf, sizeof(header));
Where buf is the data.