+ 4
What is template and whats the use ?
3 odpowiedzi
+ 9
to create templates of things like functions and classes. Say we needed a function that accepted two or more different data types. Instead of having to write two or more different functions we can create one template function.
When the program is compiled the compiler automatically creates the required functions for you with the correct data types
+ 2
@jay
example please.