C/C++ solutions