• <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  回復  更多評論   

            久久99国产精品99久久| 久久中文字幕视频、最近更新| 亚洲成色WWW久久网站| 久久久久亚洲AV无码专区体验 | 久久一区二区三区免费| 人妻无码αv中文字幕久久琪琪布| 东方aⅴ免费观看久久av| 99久久精品免费看国产免费| 伊人热热久久原色播放www| 99re久久精品国产首页2020| 亚洲国产成人久久综合一区77| 99久久免费国产精精品| 久久人人添人人爽添人人片牛牛| 婷婷综合久久狠狠色99h| 性高湖久久久久久久久| 无码8090精品久久一区| 国产69精品久久久久9999| 久久综合久久自在自线精品自| 久久午夜福利电影| 久久高清一级毛片| 亚洲一区中文字幕久久| 久久精品a亚洲国产v高清不卡| 久久婷婷五月综合97色直播| 99久久精品免费看国产免费| 99久久无色码中文字幕| 97超级碰碰碰久久久久| 久久99精品久久久久子伦| 亚洲va久久久噜噜噜久久男同| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 色综合久久天天综合| 久久久久99精品成人片直播| 性做久久久久久久| 色欲综合久久中文字幕网 | 麻豆精品久久精品色综合| 国产午夜久久影院| 久久亚洲精品视频| 狠狠人妻久久久久久综合蜜桃| 国内精品久久久久久久coent | 综合网日日天干夜夜久久| 7777精品久久久大香线蕉| 久久精品人人做人人爽97|