Hi All,
I am trying to use the TNT (template numerical toolkit) include files in some of my C++ code. In one of the files the class operator 'sign' is overloaded:
"inline double sign(double a)
{
return (a > 0 ? 1.0 : -1.0);
}
inline float sign(float a)
{
return (a > 0.0 ? 1.0f : -1.0f);
}
"
When I try to use this include my compiler (g++ from command line) gives the following error:
"
/usr/include/tnt/tntmath.h: In function 'float TNT::sign(float)':
/usr/include/tnt/tntmath.h:65: error: declaration of C function 'float TNT::sign(float)' conflicts with
/usr/include/tnt/tntmath.h:58: error: previous declaration 'double TNT::sign(double)' here
"
Any ideas?
Thanks,
ScKaSx
I am trying to use the TNT (template numerical toolkit) include files in some of my C++ code. In one of the files the class operator 'sign' is overloaded:
"inline double sign(double a)
{
return (a > 0 ? 1.0 : -1.0);
}
inline float sign(float a)
{
return (a > 0.0 ? 1.0f : -1.0f);
}
"
When I try to use this include my compiler (g++ from command line) gives the following error:
"
/usr/include/tnt/tntmath.h: In function 'float TNT::sign(float)':
/usr/include/tnt/tntmath.h:65: error: declaration of C function 'float TNT::sign(float)' conflicts with
/usr/include/tnt/tntmath.h:58: error: previous declaration 'double TNT::sign(double)' here
"
Any ideas?
Thanks,
ScKaSx