Port a number of easy solutions to C++.