A Testing C++ Solution