|
发表于 2020-7-6 08:52:03
|
显示全部楼层
本帖最后由 tony666 于 2020-7-6 09:02 编辑
- #include <iostream>
- #include<tchar.h>
- #include<windows.h>
- using namespace std;
- int main()
- {
- char str[] = "Hello world!";
- wchar_t wstr[] = L"L Hello world!";
- MessageBoxA(NULL,"hello","ANSI",MB_OK);
- MessageBoxW(NULL,L"hello",L"UNICODE",MB_OK);
- cout << strlen(str) << endl;
- cout<< wcslen(wstr)<<endl;
- return 0;
- }
复制代码
在我这是正常的,没配置什么额外的东西
#include<tchar.h>
#include<windows.h>
先试试有没有用
为什么不用ANSI呢,统一用ANSI函数不可以吗 |
|