-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.cpp
More file actions
23 lines (19 loc) · 801 Bytes
/
Copy pathmain.cpp
File metadata and controls
23 lines (19 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <windows.h>
int main()
{
SetConsoleCP(CP_UTF8);
SetConsoleOutputCP(CP_UTF8);
auto h = CreateFileA("😊.txt", // name of the write
GENERIC_WRITE, // open for writing
0, // do not share
NULL, // default security
CREATE_NEW, // create new file only
FILE_ATTRIBUTE_NORMAL, // normal file
NULL); // no attr. template
CloseHandle(h);
std::cout << "สวัสดีชาวโลก\n"
<< "こんにちは世界\n"
<< "مرحبا بالعالم\n"
<< "你好,世界 😊\n";
}