Re: double is integer?



On Mon, 5 Feb 2007 16:55:23 -0000, "GT" <ContactGT_remove_@xxxxxxxxxxx>
wrote:

How about:

bool isInteger(const double& d)
{

long int i = (long int) d;
if ((double) i == d)
{
// we have an integer
return true;
}
else
return false;
}

Substituting long for the OP's int doesn't solve anything.

--
Doug Harrison
Visual C++ MVP
.



Relevant Pages