/****************************************************************************** * This program prints town favorites using emoji. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; static wstring const LOVE_TOWN = L"Saint Louis"; static wstring const HATE_TOWN = L"East Saint Louis"; static wstring const HEART = L"\U0001F494"; static wstring const BROKEN_HEART = L"\U0001F49C"; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); wstring const LOVE = wstring(L"I ") + HEART + wstring(L" ") + LOVE_TOWN + wstring(L"!"); wstring const HATE = wstring(L"I ") + BROKEN_HEART + wstring(L" ") + HATE_TOWN + wstring(L"!"); wcout << LOVE << endl; wcout << HATE << endl; return 0; }