티스토리 뷰

Development

[MFC] CString int double 형변환

devbible 2018. 7. 15. 22:40

MFC

※ UniCode // CString -> int convert CString strNum = _T("5"); int nNum = _ttoi(strNum); // int -> CString convert int nNum = 5; CString strNum; strNum.Format(_T("%d"), nNum); // CString -> double CString strNum = _T("5.5"); double nNum = _wtof(strNum); // double -> CString double nNum = 5.5; CString strNum; strNum.Format(_T("%f"), nNum); ※ Multibyte _ttoi -> atoi _wtof -> atof


링크 : http://frostguy.tistory.com/32


[작성] devbible.tistory.com



댓글