• <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>
            posts - 311, comments - 0, trackbacks - 0, articles - 0
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            (地基工)virtual 關鍵字

            Posted on 2011-02-28 16:28 點點滴滴 閱讀(211) 評論(0)  編輯 收藏 引用 所屬分類: 02 編程語言
            class test1
            {
            public:
                
            virtual void animation()
                {
                    cout 
            << "test1 animation" << endl;
                }

                
            virtual void animation1() = 0;
            };

            class test2 : public test1
            {
            public:
                
            virtual void animation1()
                {
                    cout 
            << "test2 animation1" << endl;
                }
                
            void animation()
                {
                    cout 
            << "test2 animation" << endl;
                }
            };

            class test3 :public test2
            {
                
            void animation1()
                {
                    cout 
            << "test3 animation1" << endl;
                }
                
            void animation()
                {
                    cout 
            << "test3 animation" << endl;
                }
            };

            int _tmain(int argc, _TCHAR* argv[])
            {
            //    allocatePractice();
                test1* test = new test3();
                test
            ->animation();
                test
            ->animation1();

            //     //定義
            //     std::pair<int, string> ming(1,"ming1");
            //     std::map<int ,string> authors;
            //     //插入
            //     authors.insert(make_pair(3,"ming3"));
            //     authors.insert(map<int, string>::value_type(2,"ming2"));
            //     authors.insert(ming);    
            // 
            //     cout << authors[4] << endl;
                

                
            return 0;
            }
            virtual 為重載關鍵字,父類方法加上這個關鍵字,可以實現重載
            輸出:
            test3 animation
            test3 animation1
            蜜臀av性久久久久蜜臀aⅴ| 久久综合给合久久国产免费| AV狠狠色丁香婷婷综合久久| 日韩精品国产自在久久现线拍| 久久99国产一区二区三区| 欧美精品一区二区久久| 久久人人爽人人爽人人片av高请| 日韩久久久久久中文人妻| 久久九九亚洲精品| 伊人久久大香线蕉av不卡| 青青青国产成人久久111网站| 久久笫一福利免费导航| 久久久久四虎国产精品| 久久九九久精品国产免费直播| 91性高湖久久久久| 久久久久久久久久久久中文字幕| 久久精品无码一区二区日韩AV| 色婷婷综合久久久中文字幕| 久久精品中文字幕第23页| avtt天堂网久久精品| 18岁日韩内射颜射午夜久久成人| 国产成人精品综合久久久| 99久久婷婷国产综合亚洲| 久久久久久精品久久久久| 久久久久久av无码免费看大片| 久久91亚洲人成电影网站| 久久av无码专区亚洲av桃花岛| 国内精品久久国产| 久久e热在这里只有国产中文精品99 | 日韩十八禁一区二区久久| 97久久天天综合色天天综合色hd| A级毛片无码久久精品免费| 伊人久久五月天| 波多野结衣久久| 久久人妻AV中文字幕| 一日本道伊人久久综合影| 日韩亚洲国产综合久久久| 日本高清无卡码一区二区久久 | 一本色道久久综合亚洲精品| 久久综合九色综合网站| 婷婷久久五月天|