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

            Dain

            寫出一個可以工作的程序并不夠

            統計

            留言簿(3)

            積分與排名

            良師益友

            閱讀排行榜

            評論排行榜

            Getting the Minimum and Maximum Values for a Numeric Type

            Getting numeric limits

            #include <iostream>
            #include 
            <limits>

            using namespace std;

            template
            <typename T>
            void showMinMax() {
               cout 
            << "min: " << numeric_limits<T>::min() << endl;
               cout 
            << "max: " << numeric_limits<T>::max() << endl;
               cout 
            << endl;
            }


            int main() {
               cout 
            << "short:" << endl;
               showMinMax
            <short>();
               cout 
            << "int:" << endl;
               showMinMax
            <int>();
               cout 
            << "long:" << endl;
               showMinMax
            <long>();
               cout 
            << "long long:" << endl;
               showMinMax
            <long long>();
               cout 
            << "float:" << endl;
               showMinMax
            <float>();
               cout 
            << "double:" << endl;
               showMinMax
            <double>();
               cout 
            << "long double:" << endl;
               showMinMax
            <long double>();
               cout 
            << "unsigned short:" << endl;
               showMinMax
            <unsigned short>();
               cout 
            << "unsigned int:" << endl;
               showMinMax
            <unsigned int>();
               cout 
            << "unsigned long:" << endl;
               showMinMax
            <unsigned long>();
               cout 
            << "unsigned long long:" << endl;
               showMinMax
            <unsigned long long>();
            }

            posted on 2007-05-29 10:38 Dain 閱讀(822) 評論(2)  編輯 收藏 引用 所屬分類: 筆記

            評論

            # re: Getting the Minimum and Maximum Values for a Numeric Type 2007-05-29 11:00 夢在天涯

            恩,不錯,模版使用恰當!  回復  更多評論   

            # re: Getting the Minimum and Maximum Values for a Numeric Type 2007-05-29 11:57 Dain

            @夢在天涯
            3x  回復  更多評論   

            久久精品国产男包| 99999久久久久久亚洲| 综合久久精品色| 精品久久久久久中文字幕| 亚洲精品午夜国产va久久| 国产成人精品久久综合| 国产成人久久激情91| 久久精品国产亚洲5555| 91精品国产91久久久久福利| 色综合久久中文色婷婷| 久久99精品久久久久久久不卡| 亚洲色欲久久久久综合网| 久久这里只有精品18| 新狼窝色AV性久久久久久| 国产精品久久新婚兰兰| 青青草原综合久久大伊人| 久久91精品国产91久久小草| 亚洲成av人片不卡无码久久| 亚洲人成电影网站久久| 久久婷婷久久一区二区三区| 久久精品国产亚洲av麻豆图片| 久久国产精品波多野结衣AV| 久久久久亚洲AV成人网人人软件 | …久久精品99久久香蕉国产 | 国产精品久久久久影院嫩草| 亚洲精品国产第一综合99久久| 久久精品国产99久久香蕉| 久久99精品综合国产首页| 日韩精品无码久久久久久| 无码人妻久久一区二区三区蜜桃| 青青草国产精品久久久久| 国产精品久久久久久久久| 国内精品久久久久影院日本| 中文字幕乱码人妻无码久久| 精品久久久噜噜噜久久久| 久久亚洲AV成人无码国产| 久久精品国产亚洲AV忘忧草18 | 亚洲综合久久久| 国产aⅴ激情无码久久| 亚洲国产精品久久久天堂| 亚洲女久久久噜噜噜熟女|