add c++ training code