Ah, the joys of C++