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

            luqingfei@C++

            為中華之崛起而崛起!
            兼聽則明,偏聽則暗。

            關(guān)于函數(shù)重載的練習(xí)

             

            #include <iostream>
            #include 
            <string>
            using std::cout;
            using std::endl;
            using std::string;

            // Function prototype
            int plus(int a, int b);
            double plus(double a, double b);
            string plus(const string& a, const string& b);

            void main() {
                cout 
            << "plus(3, 4) = " << plus(34<< endl;
                cout 
            << "plus(3.2, 4.2) = " << plus(3.24.2<< endl;
                cout 
            << "plus(\"he\", \"llo\") = " << plus("he""llo"<< endl;
                
                cout 
            << "plus(static_cast<double>(3), 4.2) = " << plus(static_cast<double>(3), 4.2<< endl;
                cout 
            << "plus(3, static_cast<int>(4.2)) = " << plus(3, static_cast<int>(4.2)) << endl;

            }


            int plus(int a, int b) {
                
            return a + b;
            }


            double plus(double a, double b) {
                
            return a + b;
            }


            string plus(const string& a, const string& b) {
                
            return a + b;
            }

            posted on 2009-02-13 17:34 luqingfei 閱讀(258) 評論(0)  編輯 收藏 引用 所屬分類: C++基礎(chǔ)

            導(dǎo)航

            <2009年2月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            1234567

            統(tǒng)計

            留言簿(6)

            隨筆分類(109)

            隨筆檔案(105)

            Blogers

            Game

            Life

            NodeJs

            Python

            Useful Webs

            大牛

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            評論排行榜

            亚洲精品高清久久| 久久精品人人做人人爽电影| 色成年激情久久综合| 久久男人AV资源网站| 无码国产69精品久久久久网站| 久久国产一区二区| 亚洲国产精品无码久久青草| 色狠狠久久AV五月综合| 色偷偷888欧美精品久久久| 一级女性全黄久久生活片免费| 91精品国产乱码久久久久久| 色婷婷久久综合中文久久一本| 久久精品国产99国产精偷| 一日本道伊人久久综合影| 久久综合狠狠综合久久激情 | 一本色道久久综合狠狠躁| 欧洲国产伦久久久久久久| 久久久精品午夜免费不卡| 中文字幕人妻色偷偷久久| 久久综合精品国产一区二区三区 | 久久精品中文无码资源站| 国产69精品久久久久9999| 99久久久国产精品免费无卡顿| 久久99久国产麻精品66| 久久九九久精品国产免费直播| 97久久精品无码一区二区| 囯产精品久久久久久久久蜜桃| 久久久久久久综合狠狠综合| 中文字幕亚洲综合久久菠萝蜜| 久久精品国产99久久丝袜| 91精品日韩人妻无码久久不卡| 久久亚洲精精品中文字幕| 99精品国产99久久久久久97 | 久久精品成人| 久久人人超碰精品CAOPOREN| 久久精品国产一区二区三区不卡| 久久99精品国产麻豆蜜芽| 久久久久99精品成人片三人毛片| 精品水蜜桃久久久久久久| 久久亚洲国产成人影院网站 | 国产精品久久久久久搜索|