Hi

I'm hoping this question is an easy one to answer .

I have 3 variables, 1 is a short integer and the other 2 are long integer variable types. After compiling and running the program I write the address values of all three variable types to the screen which currently give me:

  • 0x0066FDF4
  • 0x0066FDF0
  • 0x0066FDEC


Ok, that's all fine except the first address was the short integer and the second address in that list was the first long integer meaning it should have a 2 byte difference from the first value right?

If I use the sizeof command to get the values of different data types I get correct values for my OS (win98). Is there an option in the MSVC compiler to make the short integer types actually get compiled with a size of 2 bytes?

I may have just skipped over something really stupid btw lol.

Thanx