Continue reading "C++ Casting, or: “Oh No, They Broke Malloc!”"
C++ Casting, or: “Oh No, They Broke Malloc!”
The first time you try compiling your C code with a C++ compiler can be terrifying. One of the most troublesome offenders is malloc, and you will have your eyes opened to the number of implicit type conversions in your code. Table of Contents: malloc: C vs C++ C++ Casts static_cast reinterpret_cast const_cast const_cast and …
