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

            精品久久久久久无码专区不卡 | 久久综合丁香激情久久| 亚洲日韩中文无码久久| 久久综合精品国产二区无码| 久久久久久夜精品精品免费啦| 久久亚洲春色中文字幕久久久 | 久久se精品一区精品二区国产| 狠狠久久综合伊人不卡| 亚洲精品国产自在久久| 久久精品国产第一区二区三区| 91久久精品国产免费直播| 亚洲国产精品综合久久一线 | 94久久国产乱子伦精品免费| 婷婷久久综合九色综合绿巨人| 综合久久久久久中文字幕亚洲国产国产综合一区首 | 久久久久久精品无码人妻| 性色欲网站人妻丰满中文久久不卡| 亚洲国产精品无码久久九九| av色综合久久天堂av色综合在| 久久精品国产91久久综合麻豆自制| 久久综合给合综合久久| 狠狠干狠狠久久| 久久这里只有精品首页| 国产精品嫩草影院久久| 久久久久国产精品熟女影院| 色婷婷噜噜久久国产精品12p| 精品久久久久香蕉网| 亚洲精品无码专区久久久| 久久精品99无色码中文字幕| 国产精品久久成人影院| 少妇久久久久久被弄高潮| 久久久久久亚洲精品不卡 | 久久国产精品无码一区二区三区 | 亚洲色大成网站WWW久久九九| 国内精品久久久久影院网站| 国内精品久久久久影院日本| 久久久久久久免费视频| 久久婷婷五月综合色99啪ak | 亚洲精品97久久中文字幕无码| 伊人色综合久久| 久久国产免费观看精品|