• <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記錄開發(fā)新知道

            [C++]__declspec關(guān)鍵字

            __declspec關(guān)鍵字

            // keyword__declspec.cpp : 定義控制臺(tái)應(yīng)用程序的入口點(diǎn)。
            //
            
            // 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 閱讀(1249) 評(píng)論(1)  編輯 收藏 引用 所屬分類: C/C++

            評(píng)論

            # re: [C++]__declspec關(guān)鍵字 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  回復(fù)  更多評(píng)論   

            特殊功能
             
            日本道色综合久久影院| 无码国内精品久久人妻蜜桃| 久久久久亚洲AV无码网站| 国产精品久久国产精麻豆99网站| 国产Av激情久久无码天堂| 精品久久久久中文字| 中文字幕无码免费久久| 久久这里只有精品首页| 国产69精品久久久久APP下载| 伊人久久综合成人网| 久久精品亚洲乱码伦伦中文| 亚洲AV无码久久寂寞少妇| 久久久久久国产精品无码下载| 色8久久人人97超碰香蕉987| 国产免费福利体检区久久| 久久久久成人精品无码中文字幕| 国产精品成人99久久久久91gav | 97久久超碰国产精品旧版| 久久本道久久综合伊人| 97精品国产91久久久久久| 久久久久久免费视频| 精品免费久久久久国产一区| 国产成人精品久久二区二区| 亚洲欧美日韩久久精品第一区| 91精品国产91热久久久久福利| 久久综合久久自在自线精品自| 中文成人无码精品久久久不卡| 久久www免费人成看国产片| 99国内精品久久久久久久| 久久精品中文字幕无码绿巨人| 免费久久人人爽人人爽av| 中文字幕久久亚洲一区| 久久精品国产亚洲Aⅴ香蕉| 成人a毛片久久免费播放| 久久亚洲精品视频| 久久久久人妻一区精品色| 中文字幕久久精品无码| 精品久久久中文字幕人妻| 欧美一区二区三区久久综| 欧美午夜精品久久久久免费视| 久久香蕉超碰97国产精品|