Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
UTF-8 in C++11
#include <codecvt> #include <locale> #include <iostream> #include <iomanip> int main() { using namespace std; locale wcin_loc{wcin.getloc(), new codecvt_utf8<wchar_t>{}}; wcin.imbue(wcin_loc); locale wcout_loc{wcout.getloc(), new codecvt_utf8<wchar_t>{}}; wcout.imbue(wcout_loc); wcout << "Len Word" << endl; wcout << "=== ====" << endl; for (wstring str; wcin >> str; ) { wcout << setw(3) << str.length() << " " << str << endl; } }
run
|
edit
|
history
|
help
0
Array-Based Heap Example Starter Code
for_each_argument
Calculate H.C.F using recursion
general
Uno
DESim Example with Hash Table
Narrowing error
Access to temporary object
Pure virtual function called!
Vector of pointer of P...