티스토리 뷰
CString strhex = _T("8CEF");
_tprintf(_T("hex: %s \n"), (LPCTSTR)strhex);
unsigned long dec = _tcstoul(strhex, NULL, 16);
_tprintf(_T("dec: %d \n"), dec);
CString bin;
CString buf;
TCHAR mod[2];
do
{
_ultot(dec % 2, mod, 2);
buf = mod;
buf += bin;
bin = buf;
} while (dec = dec / 2);
_tprintf(_T("bin: %s \n"), (LPCTSTR)bin);
_tprintf(_T("hex: %s \n"), (LPCTSTR)strhex);
unsigned long dec = _tcstoul(strhex, NULL, 16);
_tprintf(_T("dec: %d \n"), dec);
CString bin;
CString buf;
TCHAR mod[2];
do
{
_ultot(dec % 2, mod, 2);
buf = mod;
buf += bin;
bin = buf;
} while (dec = dec / 2);
_tprintf(_T("bin: %s \n"), (LPCTSTR)bin);
CString strhex = _T("8CEF");
_tprintf(_T("hex: %s \n"), (LPCTSTR)strhex);
unsigned long dec = _tcstoul(strhex, NULL, 16);
_tprintf(_T("dec: %d \n"), dec);
TCHAR bin[1024];
_ultot(dec, bin, 2);
_tprintf(_T("bin: %s \n"), bin);
_tprintf(_T("hex: %s \n"), (LPCTSTR)strhex);
unsigned long dec = _tcstoul(strhex, NULL, 16);
_tprintf(_T("dec: %d \n"), dec);
TCHAR bin[1024];
_ultot(dec, bin, 2);
_tprintf(_T("bin: %s \n"), bin);
'Code > C C++' 카테고리의 다른 글
| [C++/CLI] #pragma managed, #pragma unmanaged (0) | 2009.05.09 |
|---|---|
| [C++/CLI] #pragma managed, #pragma unmanaged, Windows API (0) | 2009.05.09 |
| [MFC] CString Sample (0) | 2009.03.17 |
| [C/C++] Dialog Test Sample Project (0) | 2008.11.11 |
| [C/C++] Dely (0) | 2008.11.09 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- windows
- Rollback Rx
- iText
- autohotkey
- 애드센스숨기기
- download.com
- 스크린캡쳐
- java
- AdSense숨기기
- .net framework
- DotNetMagic
- registry
- WinAutomation
- 애드센스감추기
- READYSTATE_COMPLETE
- Automation
- c#
- Microsoft
- AxWebBrowser
- Sample Code
- Service pack
- AdSense감추기
- Regular Expressions
- jre
- iTextSharp
- 유틸리티
- ScreenHunter
- Phalanger
- tagREADYSTATE
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
글 보관함