C++ Template allows function & classes to operate on different data types without overwriting entire code. Implement 2 types of templates in c++ with example.