A template in c++ is defined as a blueprint for creating a generic class or a function. Templates are a very powerful feature of C++.