Some C++ practice