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 »

C++ For C# Developers: Part 3 – Variables and Initialization

Today we continue the series by introducing variables and how they’re initialized. This is another basic topic with surprising complexity for C# developers.

Read the rest of this article »

C++ For C# Developers: Part 2 – Primitive Types and Literals

The series continues today with our first actual C++ code! Today we’ll start with the absolute fundamentals—primitive types and literals—on which we’ll build through the rest of the series. As basic as this topic sounds, some of it can be pretty shocking when coming from a language like C#.

Read the rest of this article »

C++ For C# Developers: Part 1 – Introduction

Outside of Unity, C# is rarely used as a game programming language. C++ is used heavily in Unreal, Cryengine, Lumberyard, and almost all proprietary game studio engines. This series is for Unity game programmers who know C# and want to broaden their skills so they can effectively write code for other engines, or even write C++ scripts for Unity. Today we’ll begin with an introduction to C++’s history, standard library, tools, community, and documentation. Read on to get started!

Read the rest of this article »

LINQ-Style Generic Algorithms for Burst

We’ve seen how to create powerful, Burst-compatible generic algorithms already, but today we’ll take another approach to generic algorithms and implement them in the style of C#’s LINQ. Along the way, we’ll tackle a new challenge by implementing a generic algorithm that allocates a new collection.

Read the rest of this article »