the answer to some code eval problems in C++