Thread: sizeof struct

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Registered User
    Join Date
    Mar 2003
    Location
    UK
    Posts
    170
    Its to do with struct member alignment. Code can be compiled with different alignments either 1, 2, 4, 8, 16 bytes (MS VC++ 6), 8 is the default setting. I compiled the code different alignments:

    1 byte - sizeof = 6
    2 byte - sizeof = 6
    4 byte - sizeof = 8
    8 byte - sizeof = 8
    16 byte - sizeof = 8
    Last edited by Scarlet7; 05-10-2003 at 03:47 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  2. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  3. Replies: 10
    Last Post: 05-18-2006, 11:23 PM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM