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

            tbyxyz

            統(tǒng)計(jì)

            留言簿

            閱讀排行榜

            評(píng)論排行榜

            VC中數(shù)字與字符串轉(zhuǎn)換方法

            字符串轉(zhuǎn)數(shù)字

            1CRT函數(shù)

             

             

            ASCII

            UNICODE

            TCHAR

            VS2005

            int

            atoi

            _wtoi

            _tstoi

            _ttoi

            _atoi_l

            _wtoi_l

            long

            atol

            _wtol

            _tstoi

            _ttoi

            _atoi_l

            _wtoi_l

            __int64

            _atoi64

            _wtoi64

            _tstoi64

            _ttoi64

            _atoi64_l

            _wtoi64_l

            float

             

             

             

            _atoflt

            _atoflt_l

            double

            atof

            _wtof

            _tstof

            _ttof

            _atof_l

            _wtof_l

            _atodbl

            _atodbl_l

            long double

             

             

             

            _atoldbl

            _atoldbl_l

            2.使用sscanf

            3.Windows SDK

            <shlwapi.h>StrToInt

            4.MFC/ATL

                 CString::Format

            數(shù)字轉(zhuǎn)字符串

            1.CRT函數(shù)

             

             

            ASCII

            UNICODE

            TCHAR

            VS2005

            int

            itoa

            _itoa

            _itow

            _itot

             

            long

            ltoa

            _ltoa

            _ltow

            _ltot

             

            __int64

            _i64toa

            _i64tow

            _i64tot

             

            double

            gcvt

            _gcvt

            _ecvt

            _fcvt

            _wtof

            _tstof

            _ttof

            _gcvt_s

            _ecvt_s

            _fcvt_s

            2.使用sprintf

            3.<strsafe.h>StringCbPrintf

             

            通用相互轉(zhuǎn)換方法

            1.C++流方式:

            stringstream 

            2.boost庫(kù):

            boost:: lexical_cast

             


             

            摘自MSDN

            Data-Conversion Routines

            Routine

            Use

            atof, _atof_l, _wtof, _wtof_l

            Convert string to float

            atoi, _atoi_l, _wtoi, _wtoi_l

            Convert string to int

            _atoi64, _atoi64_l, _wtoi64, _wtoi64_l

            Convert string to __int64

            atol, _atol_l, _wtol, _wtol_l

            Convert string to long

            _ecvt, _ecvt_s

            Convert double to string of specified length

            _fcvt, _fcvt_s

            Convert double to string with specified number of digits following decimal point

            _gcvt, _gcvt_s

            Convert double number to string; store string in buffer

            _itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui64tow, _itoa_s, _i64toa_s, _ui64toa_s, _itow_s, _i64tow_s, _ui64tow_s

            Convert int or __int64 to string

            _ltoa, _ltow, _ltoa_s, _ltow_s

            Convert long to string

            strtod, _strtod_l, wcstod, _wcstod_l

            Convert string to double

            strtol, wcstol, _strtol_l, _wcstol_l

            Convert string to long integer

            strtoul, _strtoul_l, wcstoul, _wcstoul_l

            Convert string to unsigned long integer

            _ultoa, _ultow, _ultoa_s, _ultow_s

            Convert unsigned long to string

            atof, _atof_l, _wtof, _wtof_l

            Convert wide-character string to a double

            atoi, _atoi_l, _wtoi, _wtoi_l

            Convert wide-character string to int

            _atoi64, _atoi64_l, _wtoi64, _wtoi64_l

            Convert wide-character string to __int64

            atol, _atol_l, _wtol, _wtol_l

            Convert wide-character string to long

             

            posted on 2008-01-13 16:17 hosea 閱讀(17273) 評(píng)論(3)  編輯 收藏 引用

            評(píng)論

            # re: VC中數(shù)字與字符串轉(zhuǎn)換方法 2008-10-09 14:18 slime

            good!!!!  回復(fù)  更多評(píng)論   

            # re: VC中數(shù)字與字符串轉(zhuǎn)換方法[未登錄](méi) 2013-03-28 17:41 Coder

            哈哈,謝謝樓主的總結(jié),學(xué)習(xí)了  回復(fù)  更多評(píng)論   

            # re: VC中數(shù)字與字符串轉(zhuǎn)換方法 2013-08-21 11:37 mxs810

            好啊  回復(fù)  更多評(píng)論   


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            2020最新久久久视精品爱| 久久精品国产精品亚洲人人| 欧美精品乱码99久久蜜桃| 亚洲国产婷婷香蕉久久久久久| 久久久久亚洲精品无码蜜桃| 久久精品国产一区二区| 一本大道久久东京热无码AV| 久久青青草原精品国产| 99久久国产综合精品网成人影院| 青青青青久久精品国产h久久精品五福影院1421 | 久久久久久国产精品无码下载 | 99久久无色码中文字幕| 国内精品九九久久精品| 久久久久噜噜噜亚洲熟女综合| 亚洲精品国精品久久99热| 成人免费网站久久久| 免费无码国产欧美久久18| 青青热久久综合网伊人| 99久久精品国产一区二区蜜芽| 久久久久久亚洲精品影院| 久久久久久毛片免费看| 精品国际久久久久999波多野| 777米奇久久最新地址| 狠狠色丁香久久婷婷综合图片| 免费观看成人久久网免费观看| 久久精品国产亚洲av麻豆小说| 国产精品久久久久a影院| 亚洲欧美精品一区久久中文字幕| 91精品婷婷国产综合久久| 久久精品国产亚洲欧美| 大美女久久久久久j久久| 久久久久久亚洲精品无码| Xx性欧美肥妇精品久久久久久| 国产V综合V亚洲欧美久久| 久久久久久人妻无码| 国内精品九九久久久精品| 久久国产精品成人片免费| 丰满少妇高潮惨叫久久久| 国产午夜免费高清久久影院| 国产精品久久免费| 久久综合狠狠综合久久激情 |