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

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

            關于函數重載的練習

             

            #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++基礎

            導航

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

            統計

            留言簿(6)

            隨筆分類(109)

            隨筆檔案(105)

            Blogers

            Game

            Life

            NodeJs

            Python

            Useful Webs

            大牛

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            評論排行榜

            热久久这里只有精品| 婷婷久久五月天| 久久久久国产精品熟女影院 | 欧美伊人久久大香线蕉综合| 女同久久| 久久精品国产亚洲精品2020 | 久久无码中文字幕东京热| 久久久无码精品亚洲日韩蜜臀浪潮 | 亚洲精品无码久久久久久| 国产精品久久久久天天影视| 亚洲精品NV久久久久久久久久| 久久精品成人国产午夜| 四虎国产精品成人免费久久| 亚洲国产精品久久久久网站| 亚洲成色www久久网站夜月| 久久国产成人精品国产成人亚洲| 亚洲综合精品香蕉久久网| 欧美亚洲日本久久精品| 久久综合丁香激情久久| 亚洲国产精品18久久久久久| 亚洲国产成人精品久久久国产成人一区二区三区综 | 久久久久久久波多野结衣高潮| 国产激情久久久久影院| 国产精品久久永久免费| 久久久久久亚洲Av无码精品专口| 日韩电影久久久被窝网| 国产成人AV综合久久| 91亚洲国产成人久久精品网址| 国内精品久久久久影院一蜜桃| 一本色道久久综合亚洲精品| 久久久久亚洲AV片无码下载蜜桃| 欧美日韩精品久久久久| 久久综合色区| 少妇熟女久久综合网色欲| 久久久噜噜噜久久| 亚洲午夜久久久| 久久精品久久久久观看99水蜜桃| 久久精品人妻中文系列| 俺来也俺去啦久久综合网| 久久青草国产手机看片福利盒子| 久久国产精品久久精品国产|