Could someone tell me the size and c++ equivalent of the following:
I found these in a file format specification, and there was no info on how big these are;Code:DWORD BYTE WORD SHORT LONG
This is a discussion on file format within the C++ Programming forums, part of the General Programming Boards category; Could someone tell me the size and c++ equivalent of the following: Code: DWORD BYTE WORD SHORT LONG I found ...
Could someone tell me the size and c++ equivalent of the following:
I found these in a file format specification, and there was no info on how big these are;Code:DWORD BYTE WORD SHORT LONG
use sizeof() to find the sizes
I believe the following may be the intended sizes:Originally Posted by arjunajay
Code:DWORD -> 32-bit, 4-byte, unsigned (likely unsigned long) BYTE -> 8-bit, 1-byte, unsigned (likely unsigned char) WORD -> 16-bit, 2-byte, unsigned (likely unsigned short) SHORT -> 16-bit, 2-byte, signed (likely short) LONG -> 32-bit, 4-byte, signed (likely long)
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*