win32 宽字符串输出

#include <Windows.h>
#include <stdio.h>
#include <locale.h>

int main()
{
	setlocale(LC_ALL, "");
	printf("Locale is %s\n", setlocale(LC_ALL, NULL));

	char c = 'A';
	printf("%c\n", c);

	WCHAR c2[] = L"我们";
	wprintf(L"%s\n", c2);

	printf("%d\n", wcslen(c2));

	system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/xiadeliang1111/article/details/121598423