Thread: file format

  1. #1
    ... arjunajay's Avatar
    Join Date
    May 2005
    Posts
    203

    Talking file format

    Could someone tell me the size and c++ equivalent of the following:
    Code:
    DWORD
    BYTE
    WORD
    SHORT
    LONG
    I found these in a file format specification, and there was no info on how big these are;

  2. #2
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    use sizeof() to find the sizes
    My Website
    010000110010101100101011
    Add Color To Your Code!

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by arjunajay
    I found these in a file format specification, and there was no info on how big these are;
    I believe the following may be the intended sizes:
    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.*

  4. #4
    ... arjunajay's Avatar
    Join Date
    May 2005
    Posts
    203
    Thanks...
    Are there any other like this...
    Just curious...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM