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