The inventor of null references has called them his billion dollar mistake. We ve all felt that pain so many times. After a while it can seem like null references are inevitable. They re just a built-in sharp edge we have to carefully avoid cutting ourselves on. But is this true? Is there some way we can [ ]
An eBook version of the C++ For C# Developers is now available. Read on for links! The eBook is available in the several formats so it ll be readable on a variety of devices and apps: PDF EPUB MOBI AZW3 (Amazon Kindle) If you d rather read the articles the book was built from, here s the table [ ]
Today we conclude the series by reflecting on how C++ and C#, as well as their standard libraries, compare. We ll also think a little about how their differences change the way we write code. Table of Contents Part 1: Introduction Part 2: Primitive Types and Literals Part 3: Variables and Initialization Part 4: Functions Part [ ]
As a very large language used for a very wide range of purposes over many decades, C++ can be written in a lot of different ways. Today we ll look at some of the norms for modern C++ to get a sense of how code is normally written. Table of Contents Part 1: Introduction Part 2: [ ]
Despite the C++ Standard Library having 13 articles worth of content, there s still quite a bit that it doesn t contain compared to what s available in C# s .NET libraries. Today we ll look at some of those gaps and see how to fill them. Table of Contents Part 1: Introduction Part 2: Primitive Types and Literals Part [ ]
We ve seen a bit of I/O in the C Standard Library already, but this isn t C++ s main way to perform I/O. Today we ll look at the streams API that s designed around C++ s support for strong types and overloaded operators rather than facilities like format strings. We ll also see how to write the canonical Hello, world! [ ]
Generic algorithms have been available in C++ for decades, but the last two versions of the language have really ramped up the functionality. C++17 added support for parallel execution of generic algorithms to easily take advantage of multi-core CPUs. Then C++20 added support for ranges, a composable version of generic algorithms that s even closer to [ ]
The C++ Standard Library s algorithms are culmination of a lot of C++ language and library features. They re like a much more featureful, much faster version of LINQ in C#. This powerful combination makes most raw loops unnecessary as they can be replaced by named function calls that are well-tested and often compile to the same [ ]
We ve covered all the individual container types, so let s take a step back and look at the containers library as a whole. A lot of features, like support for range-based for loops and allocator customization, are supported in all container types. Today we ll take a look at the commonalities between the containers and see what [ ]
Array-like containers aren t the only containers we need. Today we ll look at the non-array containers the C++ Standard Library provides, including its equivalents of Dictionary, HashSet, and LinkedList. Table of Contents Part 1: Introduction Part 2: Primitive Types and Literals Part 3: Variables and Initialization Part 4: Functions Part 5: Build Model Part 6: Control [ ]