- #include <fstream>
- #include <windows.h>
- #pragma comment(lib, "kernel32.lib")
- #pragma comment(lib, "user32.lib")
- #pragma comment(lib, "gdi32.lib")
- int main()
- {
- std::wofstream fs("testout.txt");
- const wchar_t* txt = L"some Unicode text òàèé
- //该片段来自于http://www.codesnippet.cn/detail/030620133728.html
来源: http://www.codesnippet.cn/detail/030620133728.html