Today we’ll cover the last major topic of structs in C++: how we control access to them. We’ll talk about access specifiers like private
, the “friendship” concept, and finally get around to the details of const
.
C++ For C# Developers: Part 15 – Struct and Class Permissions
C++ For C# Developers: Part 14 – Inheritance
Now that we know how to initialize structs and other types in C++, we can take a look at inheritance and learn how to make structs derive from each other. There’s a lot of extended functionality here compared to C# class inheritance. Read on to learn the basics as well as advanced features like multiple inheritance and virtual inheritance!
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!
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!
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.
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!
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!
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#!
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.
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!