C
christian
Hi!
I have a problem with a template function im MSVC6 the template function
is defined as:
template <__Type1, __Type2> int MyFunc(int param1, double param2)
{__Type1 var1;
__Type2 var2;
... do something ...
return 0;
}
SomeOtherFunction(...)
{
... some different calls of MyFunc e.g.:
MyFunc<double, long>(2, 5);
MyFunc<float, int>(3, 7);
MyFunc<short, char>(1, 2);
... do other stuff
}
When the function MyFunc is called the variable var1 has the correct
type as specified in the function call, but the type of the variable
var2 is wrong ... leading to some pointer cast problems :-(
Is something wrong with my implementation or is it a bug of MS?
Greetings Christian
I have a problem with a template function im MSVC6 the template function
is defined as:
template <__Type1, __Type2> int MyFunc(int param1, double param2)
{__Type1 var1;
__Type2 var2;
... do something ...
return 0;
}
SomeOtherFunction(...)
{
... some different calls of MyFunc e.g.:
MyFunc<double, long>(2, 5);
MyFunc<float, int>(3, 7);
MyFunc<short, char>(1, 2);
... do other stuff
}
When the function MyFunc is called the variable var1 has the correct
type as specified in the function call, but the type of the variable
var2 is wrong ... leading to some pointer cast problems :-(
Is something wrong with my implementation or is it a bug of MS?
Greetings Christian