c++ practice example