Tag Archives: templates

What is generic programming ?

What is generic programming In simple terms, generic programming is a style of computer programming in which the data types are to be specified later in the programming when needed. In C++ , generic programming is achieved using templates.  

What are templates in C++ programming ?

What are templates in C++ programming ? Templates are used in C++ to achieve generic programming and providing generic data types. It can be understood by following class template :

Example of generic function :