Hi to all, I hope uyou can help with the following situation i have:
I have to write a function that receives a parameter, that is unknow until runtime, meaning one of the parameters could be:
CString, int, double, bool or something else
The function receive additional parameters that are know and one that is unknow, for example:
void MyMethod(char *Mychar, int MyInt, <UnKnow Type> MyUnknowType);
Is possible to write this kind of functions?
I try using the Template like
template <class T>
void MyMethod (char *Mychar, int MyInt, T MyUnknowType)
{
Do Something
memberclass = MyInt;
}
The problem is that the function has to use a data member of my class and the (template)method dot reconized that variable member.
And I don't want to rewrite all the class like template only for one function
Thanks