Memory Safe C++ cover
welcome to this free extract from
an online version of the Manning book.
to read more
or
welcome

welcome

 

Thank you for purchasing the MEAP of Memory Safe C++

When I first encountered C++, what puzzled me was not the complexity. It was discovering that there were so many ways to do one simple thing, and that only a few of them were safe. I remember thinking we should just banish the unsafe ones, so everybody would learn a single way of writing C++: the safe way.

That thought followed me through every job since. I have read elegant, readable, safe code, and I have read code that compiled cleanly while waiting to fail. The difference was rarely talent. It was knowing what could go wrong and why. Meanwhile I was spending my evenings with books on C++ features, architecture, and best practices. The mechanisms underneath received far less attention: what happens in memory, why certain patterns are error prone, and how software whose failure can be lethal demands a different way of writing it.

To get the most from it, you should be comfortable writing C++. You will want working familiarity with classes, inheritance, templates, pointers, references, and memory management. The book works down at the level of the machine, reading stack frames and function prologues, so a basic understanding of computer architecture will serve you well.