Solved bob in C++