C++ For C# Developers: Part 13 – Initialization

With constructors under our belts, we can now talk about initialization of structs and other types. This is a far more complex topic than in C#. Read on to learn a lot of nitty-gritty details!

Read the rest of this article »

C++ For C# Developers: Part 12 – Constructors and Destructors

So far with structs we’ve covered data members, member functions, and overloaded operators. Now let’s talk about the main parts of their lifecycle: constructors and destructors. Destructors in particular are very different from C# and represent a signature feature of C++ that has wide-ranging effects on how we write and design code for the language. Read on to learn all about them!

Read the rest of this article »

C++ For C# Developers: Part 11 – Struct Functions

Now that we’ve covered the basics of structs, let’s add functions to them! Today we’ll explore member functions and overloaded operators.

Read the rest of this article »

C++ For C# Developers: Part 10 – Struct Basics

Let’s continue the series today by starting to look at structs. These are far more powerful in C++ than in C#, so today we’ll start with basics like defining and initializing them. Read on to get started!

Read the rest of this article »

C++ For C# Developers: Part 9 – Enumerations

We’ll continue the series today by discussing enumerations, which is yet-another surprisingly-complex topic in C++. We actually have two closely related concepts of enumerations to go over today, so read on to learn all about both kinds!

Read the rest of this article »

C++ For C# Developers: Part 8 – References

The series continues today by picking up where we left off with pointers. We’ll discuss a popularly-used alternative in C++: references. These are quite different from the various concepts of references in C#!

Read the rest of this article »

C++ For C# Developers: Part 7 – Pointers, Arrays, and Strings

Today we’ll continue the series with a look into pointers and, very differently from C#, the related concepts of arrays and strings. We’ll cover some interesting C++-only features, such as function pointers along the way.

Read the rest of this article »

C++ For C# Developers: Part 6 – Control Flow

Let’s continue the series with another nuts-and-bolts topic: control flow. The Venn diagram is largely overlap here, but both C# and C++ have their own unique features and some of the features in common have important differences between the two languages. Read on for the nitty-gritty!

Read the rest of this article »

C++ For C# Developers: Part 5 – Build Model

Today’s article continues the series by introducing C++’s build model, which is very different from C#. We’ll go into preprocessing, compiling, linking, header files, the one definition rule, and many other aspects of how our source code gets built into an executable.

Read the rest of this article »

C++ For C# Developers: Part 4 – Functions

The series continues today with functions. These are obviously core to any programming language, but it’s not obvious how many ways they differ from functions in C#. From compile-time execution to automatic return value types, there are a lot of differences to cover today.

Read the rest of this article »