Which end of a bit field is the most significant bit?

后端 未结 3 1523
我在风中等你
我在风中等你 2020-12-30 06:40

I\'m writing a C++ application for Windows XP/Vista/7 using Visual Studio 2008. Some of my structures use a bit field, as shown in the example.

typedef stru         


        
3条回答
  •  我在风中等你
    2020-12-30 07:13

    The Visual Studio 2008 compiler docs indicate:

    The ordering of data declared as bit fields is from low to high bit

    From "C++ Bit Fields", MSDN C++ Language Reference, Visual Studio 2008 version

提交回复
热议问题