May 2017
Intermediate to advanced
590 pages
17h 18m
English
All the examples in this recipe are using the std::cout predefined console stream object. However, the same applies to all input/output stream objects. Also, in this recipe examples, we will use the following objects and lambda function:
auto now = std::chrono::system_clock::now(); auto stime = std::chrono::system_clock::to_time_t(now); auto ltime = std::localtime(&stime); std::vector<std::string> names {"John", "adele", "Øivind", "François", "Robert", "Åke"}; auto sort_and_print = [](std::vector<std::string> v, std::locale const & loc) { std::sort(v.begin(), v.end(), loc); for (auto const & s : v) std::cout << s << ' '; std::cout << std::endl; };
The locale names used in this recipe (en_US.utf8, de_DE.utf8, and so on) ...
Read now
Unlock full access