What is the bit size of long on 64-bit Windows?

前端 未结 7 652
天涯浪人
天涯浪人 2020-11-22 06:50

Not to long ago, someone told me that long are not 64 bits on 64 bit machines and I should always use int. This did not make sense to me. I have se

7条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 07:11

    This article on MSDN references a number of type aliases (available on Windows) that are a bit more explicit with respect to their width:

    http://msdn.microsoft.com/en-us/library/aa505945.aspx

    For instance, although you can use ULONGLONG to reference a 64-bit unsigned integral value, you can also use UINT64. (The same goes for ULONG and UINT32.) Perhaps these will be a bit clearer?

提交回复
热议问题