Learn How To Build A Modern C++ "Hello World" Example For Windows
December 15, 2020
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…
Learn C++ With C++20: An (Almost) Complete Overview by Marc Gregoire (CPPCon 2020) Video
December 15, 2020
This video summarizes the C++20 language and its Standard Library. It tackles new enhancements on the standard library as well, including: ranges, atomic smart pointers, cancellable threads, a synchronization library, and more. The content of the discussion has been updated…
Modern Windows "Hello World" 3D Example in C++ Builder
December 14, 2020
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…
Introduction to Random Number Generation in Modern C++
December 13, 2020
Every implementation of the C++ Standard Library like one included to Embarcadero RAD Studio C++ compilers provides two ways for (pseudo-)random numbers generation: old-fashioned facilities from <cstdlib> and modern facilities provided by <random>.
Facilities…
For most C++ programmers who are looking to enhance your code, Clang-tidy is their trusted assistant. However, even though static analysis is excellent, there are still false positives as well. Now that AddressSanitizer is available for windows, this video analyzes how it…
Helpers for Generic C++ Code Accessing Container Properties
December 12, 2020
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…
Helpers for Generic C++ Code Iterating Over Sequences
December 12, 2020
The iterator library that is part of the C++ Standard Library provides the following helpers for writing generic code:
#include <iterator> // helpers are defined here
template<class Container>
void foo(Container& c)
{
// Generic way to obtain (constant)…
Range-for-statement in Modern C++
December 12, 2020
Since C++11 there are elegant way to access each element of a containers (or, more generally, sequences) – so called range-for-statement. The syntaxes are follow:
template<class Container>
void foo(Container& container)
{
for (auto element : container); // (1)
for (const auto element : container); // (2)
for (auto& element : container); // (3)
for…