Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Unicode_write2file
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 #include <locale> #include <codecvt> #include <iostream> #include <fstream> int main() { const std::locale utf8_locale = std::locale(std::locale(), new std::codecvt_utf8<wchar_t>()); std::wofstream wfout; wfout.imbue(utf8_locale); wfout.open(L"Stats.txt"); wfout << "Line 1: " << L"Hello\x00B2!" << std::endl; wfout << "Line 2: " << L"O\x00B3 x\x2080 + x\x2081 + x\x2082" << std::endl; wfout << "Line 3: " << L"x\x2083\x208A\x2084" << std::endl; wfout << "Line 4: " << L"\x20AC Euro!" << std::endl; wfout << "Line 5: " << L"2\x2077\x207B\x2079" << std::endl; wfout.close(); }
run
|
edit
|
history
|
help
0
MSVC ignoring unknown attributes
du
C++ instantiation
10dan büyük mü küçük mü
seh exception in constructor memory leak
bool behaviour (convertion/promotion) for logical and artihmetic operators
Eight Queen
Increment pointer to struct
VS struct_member_name
Hangman