• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            MyMSDN

            MyMSDN記錄開發新知道

            [C++]__declspec關鍵字

            __declspec關鍵字

            // keyword__declspec.cpp : 定義控制臺應用程序的入口點。
            //
            
            // ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.chs/kernel_d/hh/Kernel_d/64bitAMD_6db3322a-fe6d-4287-9eda-a9c1378e715d.xml.htm
            // The sizeof value for any structure is the offset of the final member, 
            //  plus that member's size, rounded up to the nearest multiple of the largest 
            //  member alignment value or the whole structure alignment value, 
            //  whichever is greater. 
            
            #include "stdafx.h"
            
            __declspec( align( 32) ) struct Struct__declspec_1
            {
                int a;
                int b;
            };
            
            __declspec( align( 32) ) struct Struct__declspec_2
            {
                __declspec( align( 64) ) int a;
                int b;
            };
            
            __declspec( align( 8 ) ) struct Struct__declspec_3
            {
                int a;  //4 bytes
                int b;  //4 bytes
                int c;  //4 bytes
            };
            
            __declspec( align( 8 ) ) struct Struct__declspec_4
            {
                int a;  //4 bytes
                int b;  //4 bytes
            };
            
            struct StructNormal
            {
                int a;  //4 bytes
                int b;  //4 bytes
                int c;  //4 bytes
            };
            
            int _tmain(int argc, _TCHAR* argv[])
            {
                printf( "sizeof Struct__declspec_1 is %d.\n", sizeof( Struct__declspec_1 ));    //32
                printf( "sizeof Struct__declspec_2 is %d.\n", sizeof( Struct__declspec_2 ));    //64
                printf( "sizeof Struct__declspec_3 is %d.\n", sizeof( Struct__declspec_3 ));    //16
                printf( "sizeof Struct__declspec_4 is %d.\n", sizeof( Struct__declspec_4 ));    //8
            
                printf( "sizeof StructNormal is %d.\n", sizeof( StructNormal ));    //12
                return 0;
            }
            
            

            posted on 2010-07-22 20:46 volnet 閱讀(1258) 評論(1)  編輯 收藏 引用 所屬分類: C/C++

            評論

            # re: [C++]__declspec關鍵字 2010-08-29 17:28 evening dresses

            MSDNQTR.v90.chs/kernel_d/hh/Kernel_d/64bitAMD_6db3322a-fe6d-4287-9eda-a9c1378e715d.xml.htm
            // The sizeof value for any structure is the offset of the final member,
            // plus that member's size, rounded  回復  更多評論   

            特殊功能
             
            久久久WWW成人免费毛片| 亚洲伊人久久精品影院| 久久美女人爽女人爽| 青青青青久久精品国产h久久精品五福影院1421 | 亚洲午夜久久久久久久久久| 欧美国产成人久久精品| 97久久国产露脸精品国产| 国产精品久久成人影院| 国产精品美女久久久免费| 久久久久亚洲爆乳少妇无| 久久九九久精品国产免费直播| 精品久久久久久久| 无码精品久久一区二区三区| 精品久久久久久久久中文字幕| 国内精品伊人久久久影院| 久久精品这里热有精品| 97久久婷婷五月综合色d啪蜜芽| 成人亚洲欧美久久久久| 97久久精品无码一区二区天美| 久久久国产精华液| 热99re久久国超精品首页| 亚洲国产精品久久久天堂| 亚洲国产成人精品无码久久久久久综合 | 狠狠色婷婷综合天天久久丁香| 国产免费久久精品99re丫y| 久久伊人中文无码| 精品无码久久久久久国产| 99久久这里只有精品| A级毛片无码久久精品免费| 日韩欧美亚洲国产精品字幕久久久 | 久久午夜夜伦鲁鲁片免费无码影视| 日本一区精品久久久久影院| 国产亚洲精品美女久久久| 精品乱码久久久久久久| 2021精品国产综合久久| 久久精品一本到99热免费| 72种姿势欧美久久久久大黄蕉| 国产精品99久久久精品无码| 亚洲国产精品成人久久| 久久男人Av资源网站无码软件| 亚洲αv久久久噜噜噜噜噜|