unicode与多字节。window内核全是unicode
http://www.cnblogs.com/beyond-code/archive/2009/03/24/1420103.html
字符类型间的转换:
1、LPCWSTR->wchar_t *;LPCSTR ->char *;LPCWSTR->const wchar_t *;
2、string ->LPWSTR L"字符串"
3、_T("字符串")变char->LPCSTR
4、CString
5、LPWSTR
6-1、int->char *:
char t[]; int n;sprintf(t,“%d”,n);
6-2、char *->int
char *s="11";int x;
x=atoi(s);
7-1、char []->CString
char code[10];CString m_str;
m_str.Format("%s",code);
7-2、CString-》char []
CString s1="ad";char s2[256];
strcpy(s2,s1);
8、CString-》void *
(void*)LPCTSTR(buf)
9、CString-》char *
a、(LPSTR)(LPCTSTR)str
b、str.GetBuffer();
10-1、int -》CString
CString str="12";int Id=10;
str.Format("%s%d", str, Id);
10-2、CString-》int
Id=atoi(str);