-
January 13th, 2018, 12:37 PM
#1
Reinterpret cast not showing correctly
I have the following:
ctx->state0 is a 200 byte array
I'm using reinterpret cast to convert the array to 32 bit values and to 64 bit values instead of 8 bits
uint64_t* h0 = reinterpret_cast<uint64_t*>(ctx->state0);
uint32_t* h00 = reinterpret_cast<uint32_t*>(ctx->state0);
cout << h0[1] << endl;
cout << h00[3]<< endl;
for h0[0] the values in h00[0] and h00[1] corespond
for h0[1] the values in h00[2] and h00[3] don't corespond
h0[1] = 1011010100110110101011001111011100011111101011010001011010000
h00[2] = 11100111100110000101110000100111
h00[3] = 11100010100001000101100000110100
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|