#include "Utils.hpp" #include #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); vector names = {L"Fred", L"Wilma", L"Barney", L"Betty"}; // Print out the name based on command line argument 1-4 for (int i = 1; i <= (argc - 1); ++i) { int const x = Utils::stoiWithDefault(Utils::UTF8_to_wstring(argv[i]), 0); wcout << i << L":" << names[x - 1] << endl; } return 0; }