随笔 - 833  文章 - 1  评论 - 106  阅读 - 199万
03 2011 档案
将unicode下的wstring转化成ansi下的string
摘要://将unicode下的wstring转化成ansi下的stringinline std::string UnicodeToASCII(LPCTSTR lpszText){ int length=_tcslen(lpszText); TCHAR* pWideCharStr=new TCHAR[length+1]; char* data=new char[2*length+2]; _tcscpy(pWideCharStr, lpszText); WideCharToMultiByte(CP_ACP, 0, pWideCharStr, -1, data, 2*length + 2, NULL, N 阅读全文
posted @ 2011-03-11 16:36 3D入魔 阅读(362) 评论(0) 推荐(0) 编辑

< 2025年2月 >
26 27 28 29 30 31 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 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示