• 0

What is a type DWORD C++


Question

7 answers to this question

Recommended Posts

  • 0

I don't believe you are correct about it being an unsigned long. An unsigned long has no standard size, just that it must be bigger or equal to than an 'unsigned' which must be bigger or equal to an 'unsigned short'. Or something alnog those lines, someone do correct me if I'm wrong.

DWORD as you said is a double WORD, but it's all about a set number of bits, and it is very architecture dependant. On the x86 chips we're mostly used to a BYTE is 8 bit, at WORD 16 and so a DWORD is 32 bits. An unsigned long on the other hand can be two completely different sizes in two different compilers even if both are compiling for same OS and architecture.

  • 0

I just looked it up and you're correct - DWORDs are not necessarily unsigned longs, just that they're 32 bits wide on x86

as you mentioned, unsigned long being 32 bits is dependent on the hardware / OS, which I took for granted

Edited by HeartsOfWar
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.