头文件:
#include <stdio.h>
#include <string.h>
#include <tchar.h>
窄字符 char 类型
const char * str = "Edison";
printf("%d", strlen(str));
宽字符 wchar_t 类型
const wchar_t * str = L"蔡徐坤";
printf("%d", wcslen(str));
通用类型
const TCHAR * str = _T("蔡徐坤");
printf("%d", _tcslen(str));
网友评论