C++C++11C++14C++17Code SnippetIntroduction to C++Language FeatureLearn C++

Learn How To Build A Modern C++ "Hello World" Example For Windows

If you are a beginner “Hello World” examples are good to understand feature of that programming language. It is good to understand how to edit text, how to write in its format, how to compile and link, how to debug and execute, how to deploy or release. This example below is a modern “Hello World” example on Windows which runs with C++ Builder. Modern applications has GUI…
Read more
C++17Generic ProgrammingLearn C++

Helpers for Generic C++ Code Accessing Container Properties

In addition to Helpers for Generic C++ Code Iterating Over Sequences the C++17 Standard Library provides the following helpers for writing generic code: #include <iterator> // new helpers of C++17 are defined here template<class Container> void foo(Container& c) { // Generic way to obtain: auto data = std::data(c); // - data; auto empty = std::empty(c); // - flag of…
Read more
C++C++11C++14C++17Iterators

Insert Iterators Adapters in C++

Let’s slightly modify the example from The Move Iterator Adapter in C++ post: #include <algorithm> #include <list> #include <string> #include <vector> /// @warning BUG! PLEASE, DON'T USE! auto deep_copy_to_list(const std::vector<std::string>& src) { std::list<std::string> dst; // constructs the empty list copy(cbegin(src), cend(src)…
Read more