Solutions to common C++ problems