Is there a way to tell what type of VAR comes in through a template function?
like this for example
I though I saw somewhere how to do this, but I can't find it.PHP Code:template <typename T>
void Combine(T &a, T &b)
{
if int or long
a = a + b;
if string
a += b;
if char
strcpy(a,b);
etc..
}
Thanks




Reply With Quote