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

            積分與排名

            良師益友

            閱讀排行榜

            評(píng)論排行榜

            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 閱讀(823) 評(píng)論(2)  編輯 收藏 引用 所屬分類: 筆記

            評(píng)論

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

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

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

            @夢(mèng)在天涯
            3x  回復(fù)  更多評(píng)論   

            亚洲性久久久影院| 亚洲国产精品一区二区久久hs| 久久精品国产免费一区| 91精品国产综合久久精品| 香蕉久久一区二区不卡无毒影院| 久久国产乱子伦精品免费午夜| 久久只有这里有精品4| 国产精品99久久99久久久| 久久精品无码一区二区app| 久久精品国产色蜜蜜麻豆| 97久久精品午夜一区二区| 久久强奷乱码老熟女网站| 精品国产一区二区三区久久久狼| 久久久久综合国产欧美一区二区| 久久精品亚洲中文字幕无码麻豆| 色婷婷久久久SWAG精品| 国产亚洲婷婷香蕉久久精品| 青青草原综合久久大伊人| 一本色道久久88加勒比—综合| 波多野结衣AV无码久久一区| 久久久人妻精品无码一区| 91精品国产色综合久久| 久久国产劲爆AV内射—百度| 久久精品国产99久久久香蕉| 精品久久久久久综合日本| 奇米影视7777久久精品| 久久亚洲高清综合| 国产精品热久久毛片| 国产一级做a爰片久久毛片| 久久夜色精品国产欧美乱| 久久精品中文字幕大胸| 久久精品人妻一区二区三区| 爱做久久久久久| 狠狠色丁香久久综合婷婷| 国产成人精品久久| 国产成人精品综合久久久| 综合久久一区二区三区 | 久久精品这里只有精99品| 国产精品久久久久久影院| 精品999久久久久久中文字幕| 丁香五月网久久综合|