c++ practice, examples