can any one tell why doesnt this print 9282798 which is the hexedecimal value in the buffer?
BYTE * buffer = new BYTE; buffer = 0; buffer = 0x8D; buffer = 0xA4; buffer = 0xEE; // 9282798 DWORD *p = (DWORD*)buffer; // Convert pointer cout << ((*p)==9282798) << " number: " << ( (DWORD) (*p) ) << endl; // print buffer as DWORD
I thought the buffer (array) could be converted to DWORD with type conversion alone because the memory has same region (4 bytes) but I guess i was wrong.
what am I doing wrong?
Edited by heh65532, 11 July 2012 - 02:10 PM.