#include "Utils.hpp" #include #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); int const a = Utils::stoiWithDefault(Utils::UTF8_to_wstring(argv[1]), 0); int const b = Utils::stoiWithDefault(Utils::UTF8_to_wstring(argv[2]), 0); int const c = a + b; wcout << fmt::format(L"{0:d} + {1:d} = {2:d}", a, b, c) << endl; return 0; }