Question

I want to use the function Sign() in a Borland C++ Builder 6 application. I cannot however find the correct header file.

When I use this function I get a compiler error saying undefined symbol, Sign.

You would think this function would be in math.h but I can't find it there. It shows up in the help list (Unit : Math).

I saw some threads for similar missing function definition (stddev for example). A solution was to add the option -lm or -lc to the compiler. But how to configure it in Borland C++ Builder graphical interface for compiling options ?

Was it helpful?

Solution

You are looking for Math.hpp. When the help says "Unit: ...", it is referring to a Delphi unit. These are made available to C++ via Unit.hpp header files generated by the Delphi compiler. math.h is a separate header file provided by the C runtime instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top