Add C++ solution