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

            久久久无码精品亚洲日韩按摩| 亚洲精品高清一二区久久| 99久久免费国产精品| 中文字幕无码久久久| 伊人久久大香线蕉无码麻豆 | 久久久青草久久久青草| 色婷婷久久综合中文久久一本| 久久亚洲精品视频| 久久久噜噜噜久久| 99久久做夜夜爱天天做精品| 亚洲午夜久久久久久久久久| 精品精品国产自在久久高清| 精品久久久久久无码免费| 色天使久久综合网天天| 久久精品无码午夜福利理论片| 亚洲国产精品无码久久久不卡| 精品国产一区二区三区久久| 色播久久人人爽人人爽人人片aV| 青草国产精品久久久久久| 久久精品成人免费网站| 久久久午夜精品| 久久精品国产一区二区三区 | 久久久国产精华液| 伊人久久大香线蕉影院95| 久久精品国产福利国产琪琪| 久久这里只有精品久久| 五月丁香综合激情六月久久| 国产精品99久久久精品无码| 欧美一级久久久久久久大片| 国产精品日韩欧美久久综合| 99久久综合狠狠综合久久止| 精品国产VA久久久久久久冰| 久久久久亚洲精品天堂| 国产精品免费看久久久| 国产精品久久久久影视不卡| 精品久久777| 国产综合精品久久亚洲| 亚洲国产成人乱码精品女人久久久不卡| 国产精品久久久久久久久久免费| 成人亚洲欧美久久久久| 亚洲AⅤ优女AV综合久久久|