• <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  回復  更多評論   

            特殊功能
             
            亚洲欧美精品一区久久中文字幕| 国产A级毛片久久久精品毛片| 欧美久久久久久午夜精品| 久久国产香蕉一区精品| 欧美久久久久久| 国产精品久久久久久搜索| 久久久噜噜噜久久| 久久精品亚洲精品国产色婷| 国产精品久久久久久久午夜片| 久久99这里只有精品国产| 久久99精品久久久久婷婷| 久久综合一区二区无码| 久久国产免费观看精品| 久久久黄色大片| 精品久久香蕉国产线看观看亚洲| 色欲综合久久躁天天躁| 久久亚洲高清观看| 国产亚洲色婷婷久久99精品| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 三级三级久久三级久久 | 久久久久国产一区二区| 99久久综合狠狠综合久久止| 女人高潮久久久叫人喷水| 久久精品国产亚洲精品| 色综合久久88色综合天天 | 久久久久亚洲av无码专区| 久久久这里只有精品加勒比| 精品久久人人妻人人做精品| 欧美一区二区精品久久| 欧美噜噜久久久XXX| 久久91精品国产91| 99久久香蕉国产线看观香| 久久国产精品无码网站| 国产一区二区三精品久久久无广告| 久久丫精品国产亚洲av不卡| 无码人妻少妇久久中文字幕蜜桃| 香港aa三级久久三级老师2021国产三级精品三级在 | 青青草原综合久久大伊人精品| 丁香五月网久久综合| 久久99国产综合精品免费| 国产V综合V亚洲欧美久久|