Bloodlines and casting

When working with objects that have an inheritance model you basically have an inverted tree that represents your object hierarchy. Contrary to a normal everyday trees, an inheritance tree has its root at the top. In other words, the root of the tree represents the base class and anything below it represents a more derived […]

Doubt and uncertainty!

The C and C++ standards documents can be a bit of a beast to trawl through and quite often you’ll find yourself reading the same sentence a number of times trying to fathom out what it is actually saying. It’s just like when you read the EULA for a software product; lots of big words […]

Building Boost on Windows

In case you’ve never heard of it before, Boost is a set of peer reviewed libraries for C++. They provide a lot of features that are sorely missing from the standard C++ libraries and are probably the closest C++ developers have to a standard development toolkit. In fact, Boost is so useful that a number […]

Set union problem

Today I had the privilege of a job interview with one of the leading companies in the online streaming music space. I’d like to think the interview went well, although I was incredibly nervous and my brain decided it was going to operate in a way that suggested it was wading through treacle; but I […]

Template syntax mind warp!

Templates are a hugely powerful feature of C++. They allow you to do so many different and cool things. Unfortunately, templates do have a bit of a reputation for having rather nasty syntax and for the most part this reputation is quite well deserved. This little quiz shows an example of some template syntax that […]

C++ Smart pointers

This article is a discussion on smart pointers, what they are and why they are important to C++ programmers. Following the primary discussion I present a simple implementation of a reference counted smart pointer and show a simple example of using it. Although this article does not go into detail about how to develop a […]

Unsafe use of smart pointers

Ubiquitous use of smart pointers can prevent memory leaks and make for much easier to read and understand code. Unfortunately, as with most things C++, there are some caveats you need to be aware of otherwise your attempts to write robust code could very well come back to bite you. This little quiz shows how […]