Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <locale>
- int main(){
- using namespace std;
- locale loc (
- locale (),
- new codecvt_byname<wchar_t, char, mbstate_t>(""));
- wcin.imbue(loc);
- wcout.imbue(loc);
- wchar_t aChar;
- cout << "Enter your char : ";
- wcin >> aChar;
- bool status = wcin.good();
- cout << "WCIN status " << status << endl;
- wcout << L"You entered " << aChar << L" .\n";
- status = wcout.good();
- cout << "WCOUT status " << status << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement