4
Contributors
5
Replies
26
Views
2 Years
Discussion Span
Last Post by Moschops
1

So that we don't have to write out the same code over and over and over to make it work with every different type. We write the template once, and then the compiler makes it work for int and double and float and char and string and your own classes and so on and so on.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.