|
-
October 13th, 2003, 09:32 AM
#6
well I can't use int because the number may not be an Integer and then I need to treat it differently, but you gave ma another idea, check the difference between the double value to the __int64 value, meaning:
double dMyDouble = atof(sMyTmpString.c_str());
dMyDouble /= 100;
double dDiff = dMyDouble - (__int64)dMyDouble;
if(dDiff)
printf("Not an integer");
else
printf("An integer");
What do you think?
Is it better than my privious one?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|