CString m_cstr;
int m_int;
string m_str;
m_cstr = L"100";
m_int = _ttoi(m_cstr);
m_int = 100;
m_cstr.Format(L"%d", m_int);
string m_str2(CW2A(m_cstr.GetString()));
CT2CA m_ct2ca(m_cstr);
string m_str3(m_ct2ca);
wstring m_wstr(m_cstr);
m_str.assign(m_wstr.begin(), m_wstr.end());
m_str = CT2A(m_cstr.GetBuffer());
CString m_cstr2(m_str.c_str());
CString m_cstr3(m_str.data());
m_cstr = m_str.c_str();
m_cstr = m_str.data();
m_cstr.Format(L"%s", m_str.c_str());
m_cstr.Format(L"%s", m_str.data());
char * m_chr;
m_cstr = _T("hello");
USES_CONVERSION;
m_chr = T2A(m_cstr);
m_chr = W2A(m_cstr);
int n = m_cstr.GetLength();
int len = WideCharToMultiByte(CP_ACP, 0, m_cstr, n, NULL, 0, NULL, NULL);
char *chr = new char[len + 1];
WideCharToMultiByte(CP_ACP, 0, m_cstr, n, chr, len, NULL, NULL);
chr[len] = '\0';
delete[] chr;
m_chr = "hello";
m_cstr = A2T(m_chr);
m_cstr = A2W(m_chr);
int charLen = strlen(m_chr);
int len = MultiByteToWideChar(CP_ACP, 0, m_chr, charLen, NULL, 0);
wchar_t *pWChar = new wchar_t[len + 1];
MultiByteToWideChar(CP_ACP, 0, m_chr, charLen, pWChar, len);
pWChar[len] = '\0';
m_cstr.Append(pWChar);
delete[] pWChar;