When we covered arrays in part 14, we skipped implementing the
 operator with them. Instead, we opted for a simpler pair of
SetItem functions. Today we’ll address that oversight so our C++ game code can index arrays just like in C#.
Posts Tagged operator overloading
Today’s article continues the series by adding support for C++ to call the various overloaded operators and indexers that are written in C#. This includes support for all 24 overloadable operators in C# plus the
implicit type conversion operators. Indexers aren’t quite overloaded operators, but they allow for array-like indexing into C# types so they’re included today. Read on to learn how all this support was implemented in the GitHub project!