• <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 閱讀(831) 評論(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  回復  更多評論   

            国产精品久久久天天影视香蕉| 久久久亚洲欧洲日产国码aⅴ | 婷婷久久综合| 性做久久久久久久久| 亚洲国产精品无码久久一区二区 | 国产精品久久网| 久久精品国产亚洲精品| 亚洲AV乱码久久精品蜜桃| 日本一区精品久久久久影院| 伊人久久大香线蕉综合5g| 91精品国产9l久久久久| 久久无码高潮喷水| 久久精品国产福利国产琪琪| 波多野结衣中文字幕久久| 中文精品99久久国产| 国产一区二区三区久久精品| 久久久久久国产精品无码下载 | 久久精品?ⅴ无码中文字幕| 亚洲AV无码一区东京热久久| 久久影院亚洲一区| 青青草原综合久久大伊人精品| 精品多毛少妇人妻AV免费久久| 国产一区二区精品久久岳| 久久精品国产精品青草| 久久人妻少妇嫩草AV无码专区 | 国产精品久久久久9999| 久久九九兔免费精品6| 亚洲国产成人精品女人久久久 | 日韩精品国产自在久久现线拍| 久久久久亚洲精品天堂| 亚洲va中文字幕无码久久不卡 | 亚洲综合精品香蕉久久网97| 性做久久久久久久| 日韩AV无码久久一区二区 | 一级女性全黄久久生活片免费 | 久久久久久久亚洲Av无码| 中文字幕热久久久久久久| 亚洲伊人久久精品影院| 亚洲AV无码久久寂寞少妇| 久久婷婷五月综合97色| 久久精品国产亚洲AV电影|