c++ code for Ericpol training