c++ - I notice ints and longs have the same size. Why? -


I looked at OSX and I found it eager because I think it should be bigger than int for a long time. Is there any good reason to make them the same size? This is the result of the loose nature of the size definitions in the C and C ++ language specifications.

I believe there is a minimum size in C, but the only rule in C ++ is this :

  1 == size (four) & lt; = Sizeof (short) & lt; = Sizeof (int) & lt; In addition,  sizeof (int)  and  sizeof (long)  are not the same size on all platforms. On every 64-bit platform that works with me, the  long term < / Code> got the shape of the natural word, 64 bit on 32 bit architecture and 64 bit on 64 bit architecture. 


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -