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!
Posts Tagged initialization
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!