• <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 閱讀(830) 評(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)論   

            日本国产精品久久| 欧美亚洲国产精品久久| 久久久久久久久久久久久久| 日本久久久久久久久久| 久久香综合精品久久伊人| 日韩乱码人妻无码中文字幕久久| 99精品久久久久中文字幕| 久久伊人亚洲AV无码网站| 国产精品岛国久久久久| 久久久久久无码国产精品中文字幕 | 久久97精品久久久久久久不卡| 久久久久99精品成人片| 久久亚洲AV成人无码国产 | 亚洲国产成人久久笫一页| 久久99国产精一区二区三区| 欧美成a人片免费看久久| 欧美丰满熟妇BBB久久久| 亚洲v国产v天堂a无码久久| 国产成人精品久久一区二区三区 | 久久国产精品波多野结衣AV| 国内精品久久久久影院优| 午夜久久久久久禁播电影| 亚洲天堂久久久| 欧美日韩中文字幕久久久不卡| 久久综合狠狠综合久久综合88| 婷婷久久综合| 伊人久久一区二区三区无码| 国产L精品国产亚洲区久久| 久久精品国产久精国产| 人妻无码中文久久久久专区| 国产精品一区二区久久精品涩爱| 久久久久99精品成人片| 久久精品国产亚洲精品| 91麻精品国产91久久久久| 久久亚洲中文字幕精品一区| 伊人色综合久久| 国产亚州精品女人久久久久久 | 久久精品这里只有精99品| 久久99国产精一区二区三区| 国产精品久久久久无码av| 日韩亚洲欧美久久久www综合网 |