CString len; CString len2; char *p = "中国2"; wchar_t * p2 = L"中国2"; int a = strlen(p); //多字节 int b = wcslen(p2); //宽字节 len.Format(_T("%d"), a); len2.Format(_T("%d"), b); MessageBox(len); //输出5 MessageBox(len2); //输出3