Original Post
Okay, this is a continue of a different post “WORD & DWORD”. To Polymorphic OOP The compiler I use is VS.NET ,does this explain any thing? And the char is one byte, hence the reason I say byte all the time. I would like to know where you got that info, because it is wrong on my machines and my friends. The int is larger then the long on a 64 bit processor. My whole point on all of this is that the int data type has a variant size depending of the processors’ bus. The char, short, and long always stay the same size. I believe that GCC produces that same size as VS.NET. The char is 1 byte, the shrot is 2 bytes, and the long is 4 bytes. The int however, is 4 bytes on my 32 bit processor, and 8 bytes on the friends’ 64 bit processor. That standard sounds not entirely true full, or you miss understand it. The int can only take values from 0 to 65,535 unsigned, and -32,768 to 32,767 signed. Even if it takes up 4 bytes, it can only hold those values. Don’t believe me, try testing it out! But the long however, can hold 2,147,483,648 to 2,147,483,647 signed, and 0 to 4,294,967,295 unsigned. The screwed up thing is, that the int and the long are the same size on my 32 bit processor. But the int STILL can’t even hold the amount of the long because of that standard or some other reason. Because on my machine, sizeof( int ) = 4. And on my friends machine sizeof( int ) = 8. However, sizeof( long ) = 4 on both of ours machines.