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.
Posts Tagged null
It’s been quite a while in the series since we’ve added any fundamental C# language features. Today we’ll address one of the limitations of the C#/C++ communication: the lack of support for
ref parameters. This is important as they’re commonly used by both the Unity API and .NET and we’d like C++ to be able to call functions with these kinds of parameters. So let’s delve into what it means for C++ to use
ref parameters and see how to implement support for that across the language boundary.
We all use
>= with integers and floating point values all the time. It just works and it’s built into basically every programming language. These simple operators suddenly become quite a pain when you start wanting to compare other objects.
IComparable seems to make it easier, but there’s some trickiness when you start dealing with
null objects. Today’s article explores this and ends up with some handy utility functions to take some of the gotchas out of comparing.