Random pieces of C++ code