template <typename T>
class example
{
public:
T value;
....
};
and I use an object of this class as a parameter of a function
1 2 3 4
int exampleFunc (example &input)
{
return (int)input.value;
}
but what have I to do when I want to use the function with any object of example, I mean with example<double> same like with example<int> or anything else. The only idea i had was to overload the function with any possible datatype but that's not practical.