• <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>

            foobar

              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
              6 隨筆 :: 14 文章 :: 0 評論 :: 0 Trackbacks

            Initializer lists

            In C++, it is the order of the class inheritance and of the member variables that determine the initialization order, not the order of an initializer list:



            #include 
            <iostream>

            class CSomeClass
            {
            public:
            CSomeClass(
            int n)
            {
            std::cout 
            << "CSomeClass constructor with value ";
            std::cout 
            << n << std::endl;
            }

            }
            ;

            class CSomeOtherClass
            {
            public:
            CSomeOtherClass() 
            //In this example, despite the list order,
            : obj2(2), obj1(1//obj1 will be initialized before obj2.
            {
            //Do nothing.
            }

            private:
            CSomeClass obj1;
            CSomeClass obj2;
            }
            ;

            int main(void)
            {
            CSomeOtherClass obj;
            return 0;
            }

            posted on 2007-06-04 11:11 foobar 閱讀(206) 評論(0)  編輯 收藏 引用
            久久亚洲sm情趣捆绑调教| 国产一区二区精品久久凹凸| 久久99国产乱子伦精品免费| 色狠狠久久AV五月综合| 久久亚洲av无码精品浪潮| 热re99久久6国产精品免费| 国产精品女同久久久久电影院| 午夜视频久久久久一区| 国产成人久久精品一区二区三区 | 久久久久久毛片免费看| 久久99精品国产自在现线小黄鸭| 久久午夜电影网| 久久丫精品国产亚洲av不卡 | 青青草原综合久久| 久久久免费精品re6| 久久青青色综合| 91精品国产9l久久久久| 久久久亚洲精品蜜桃臀| 香蕉久久一区二区不卡无毒影院| 久久久久九国产精品| 久久亚洲国产最新网站| 99国产欧美久久久精品蜜芽| 一本一本久久A久久综合精品 | 久久亚洲2019中文字幕| 久久精品无码一区二区日韩AV| 久久人人爽人人人人爽AV| 日韩亚洲国产综合久久久| 精品熟女少妇a∨免费久久| 无码专区久久综合久中文字幕 | 要久久爱在线免费观看| 69久久精品无码一区二区| 精品熟女少妇a∨免费久久| 久久精品国产亚洲av日韩| 国产精品久久久99| A级毛片无码久久精品免费| 久久久久久狠狠丁香| 亚洲色大成网站www久久九| 亚洲中文字幕无码久久精品1| 久久精品国产久精国产果冻传媒 | 国产成人久久精品激情| 久久99国产综合精品|