KJT> Does Visual C++ have a similar function? If
KJT> so, in what header file is it located and what is the name of the KJT>
function? If not, would someone please show me a function to determine KJT>
the sign of a number which would return 1 if positive, 0 if zero, and -1
KJT> if negative...?
A sign of a number is easy to get at in C++. Use the operators, and ==
to figure out a sign of a number. Something like this:
if (number > 0)
if (number < 0)
if (number == 0)
--- Maximus 3.01
---------------
* Origin: The Dragons Cave -- 2am - 5am CST (1:140/237.2)
|