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


            国产毛片欧美毛片久久久| 日韩精品久久无码中文字幕| 精品国产福利久久久| 国产精品激情综合久久| 亚洲国产成人精品无码久久久久久综合| 久久久久无码精品国产app| 狠狠色丁香久久婷婷综合_中 | 久久亚洲精品国产精品婷婷| 亚洲国产精品无码久久98| 久久er热视频在这里精品| 久久久黄色大片| 久久久久夜夜夜精品国产| 久久久久波多野结衣高潮| 91久久香蕉国产熟女线看| 免费久久人人爽人人爽av| 51久久夜色精品国产| 久久这里只有精品18| 色欲综合久久躁天天躁| 日本免费一区二区久久人人澡 | 亚洲一本综合久久| 色婷婷综合久久久中文字幕| 欧美激情精品久久久久久久| 久久国产精品久久| 久久国产亚洲精品无码| 久久99热这里只有精品国产| 久久久久久亚洲精品不卡| 久久综合综合久久狠狠狠97色88| 中文字幕热久久久久久久| 亚洲欧美精品一区久久中文字幕| 精品欧美一区二区三区久久久| 国产精品久久久久影院嫩草 | 久久久免费精品re6| 亚洲va中文字幕无码久久不卡| 欧美精品国产综合久久| 久久婷婷色综合一区二区| 亚洲中文字幕久久精品无码APP | 久久精品视频一| 久久久久久曰本AV免费免费| 欧美日韩精品久久免费| 久久久亚洲欧洲日产国码是AV| 亚洲va中文字幕无码久久不卡|