• <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 : 定義控制臺應(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 閱讀(1250) 評論(1)  編輯 收藏 引用 所屬分類: C/C++

            評論

            # 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ù)  更多評論   

            特殊功能
             
            亚洲中文字幕伊人久久无码| 色综合久久综精品| 久久天天躁狠狠躁夜夜躁2014| 久久综合色老色| av午夜福利一片免费看久久| 国产99久久久国产精免费| 久久男人中文字幕资源站| 久久亚洲精品成人AV| 国产精品丝袜久久久久久不卡| 久久久久久免费视频| 国产激情久久久久影院老熟女| 久久人人爽人人爽人人片AV不 | 99精品久久久久中文字幕| 欧美熟妇另类久久久久久不卡| 久久人人爽人人爽人人片AV不| 97精品久久天干天天天按摩| 久久99国产精品成人欧美| 狠狠色综合网站久久久久久久高清| 久久精品九九亚洲精品| 伊人色综合久久天天人守人婷| www性久久久com| 精品人妻伦九区久久AAA片69| 99热成人精品免费久久| 久久久精品国产sm调教网站 | 久久人人爽人人澡人人高潮AV | 99久久精品免费国产大片| 久久妇女高潮几次MBA| 久久久精品国产亚洲成人满18免费网站 | 国产精品18久久久久久vr| 伊人久久精品无码av一区| 久久久久久国产精品美女 | 2020久久精品亚洲热综合一本| 久久精品国产精品亚洲人人| 国内精品久久久久久麻豆| 久久久久久久免费视频| 久久青青草原国产精品免费| 久久综合伊人77777| 伊人久久大香线蕉av不变影院 | 久久天天躁狠狠躁夜夜不卡| 无码超乳爆乳中文字幕久久| 国产一级做a爰片久久毛片|