add code practice on c++ class template