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

            寫出一個(gè)可以工作的程序并不夠

            統(tǒng)計(jì)

            留言簿(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 閱讀(830) 評論(2)  編輯 收藏 引用 所屬分類: 筆記

            評論

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

            恩,不錯(cuò),模版使用恰當(dāng)!  回復(fù)  更多評論   

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

            @夢在天涯
            3x  回復(fù)  更多評論   

            欧洲性大片xxxxx久久久| 亚洲色婷婷综合久久| 无码伊人66久久大杳蕉网站谷歌| 国产成人精品久久一区二区三区av| 久久香蕉国产线看观看精品yw| 精品久久久无码21p发布| 久久这里的只有是精品23| 日本国产精品久久| 一97日本道伊人久久综合影院| 久久福利片| 婷婷国产天堂久久综合五月| 欧美久久久久久精选9999| 久久99精品久久久久久水蜜桃 | 色综合久久无码中文字幕| 久久人与动人物a级毛片| 精品综合久久久久久98| 国产成年无码久久久久毛片| 久久精品视频网| 亚洲欧洲久久久精品| 国产色综合久久无码有码| 久久国产精品无码HDAV| 91久久精品无码一区二区毛片| 精品久久久久久无码国产| 国产成人精品综合久久久久| 大伊人青草狠狠久久| 天天做夜夜做久久做狠狠| 伊人久久大香线蕉综合影院首页| 久久狠狠高潮亚洲精品| 久久高潮一级毛片免费| 国产色综合久久无码有码| segui久久国产精品| 久久久精品人妻一区二区三区蜜桃| 久久久女人与动物群交毛片| 久久精品国产亚洲7777| 欧美大香线蕉线伊人久久| 国产亚州精品女人久久久久久 | 国产精品18久久久久久vr| 人人狠狠综合久久亚洲| 久久91精品国产91久久麻豆| 一本久久免费视频| 99久久国产热无码精品免费久久久久|