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

            久久精品国产亚洲av麻豆小说 | 国内精品久久久久久久久电影网| 久久综合亚洲欧美成人| 中文字幕亚洲综合久久| 少妇人妻综合久久中文字幕 | 久久精品国产亚洲一区二区三区| 欧洲性大片xxxxx久久久| 久久久久99精品成人片直播| 青草久久久国产线免观| 色综合久久天天综合| 精品一二三区久久aaa片| 伊人色综合久久天天| 亚洲精品无码久久久久去q| 久久国产成人精品国产成人亚洲| 久久中文骚妇内射| 人人妻久久人人澡人人爽人人精品| 狠狠色丁香久久婷婷综| 亚洲午夜久久久久久久久久| 久久人妻少妇嫩草AV蜜桃| 精品久久久久久国产| 久久综合给合久久国产免费| 国产色综合久久无码有码| 香蕉99久久国产综合精品宅男自| 精品久久久久久无码中文字幕| 99精品国产在热久久无毒不卡| 亚洲综合久久久| 99精品国产免费久久久久久下载| 一本综合久久国产二区| 亚州日韩精品专区久久久| 免费一级欧美大片久久网| 久久久久亚洲AV综合波多野结衣| 色综合久久精品中文字幕首页| www.久久热.com| 99久久久久| 久久久久综合中文字幕| 久久久久婷婷| 四虎国产精品成人免费久久| 伊人久久综合无码成人网| 国产成人精品综合久久久| 亚洲AV无码1区2区久久| 国产成人久久精品激情|