How to generically pass parameters to a function. General C++ question

I have not needed to use templates but they sound rather neat.
Automatic generation of an overloaded function by the compiler.