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

            寫(xiě)出一個(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 閱讀(822) 評(píng)論(2)  編輯 收藏 引用 所屬分類(lèi): 筆記

            評(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)論   

            国产亚洲精品美女久久久| 久久久99精品一区二区| 亚洲欧美成人久久综合中文网| 99久久国语露脸精品国产| 国产亚洲精品自在久久| 久久久婷婷五月亚洲97号色 | 国产色综合久久无码有码| 婷婷久久综合| 久久婷婷午色综合夜啪| 久久久亚洲裙底偷窥综合| 久久久久久久久久久久久久 | 亚洲国产精品高清久久久| 99精品国产免费久久久久久下载| 无夜精品久久久久久| 久久久久免费精品国产| 精品熟女少妇av免费久久| 狠狠色丁香久久综合婷婷| 久久精品99无色码中文字幕| 亚洲精品久久久www| 亚洲午夜久久久影院伊人| 久久精品国产免费一区| 久久久久亚洲AV成人网人人网站| 一本色道久久88综合日韩精品 | 国产欧美一区二区久久| 久久97久久97精品免视看| 亚洲AV伊人久久青青草原| 人妻精品久久无码区| 久久精品九九亚洲精品天堂| 久久福利片| 久久综合狠狠综合久久| 九九热久久免费视频| 中文字幕人妻色偷偷久久| 四虎国产永久免费久久| 伊人色综合久久天天人手人婷| 91精品国产色综合久久| 亚洲欧美国产精品专区久久| 国产成人精品免费久久久久| 久久婷婷五月综合色奶水99啪| 欧美精品一本久久男人的天堂| 久久人妻AV中文字幕| 久久久精品日本一区二区三区|