|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm having a little problem with converting floating point values to integers. if I do something like this:
float f = 245.56; int i; i = (int)f; printf("%d\n", i); the output will be 0. Can anyone explain this problem? Do I need an explicit conversion? If so, where could I find documentation on it? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Top 10 Uses for the 10 Point Balls | EddieMcD | Chit-Chat | 10 | 30-03-2004 18:29 |
| FIRST @ The Point...Who's Going? | archiver | 2000 | 0 | 23-06-2002 23:24 |
| Possible Configuration to keep things cheap | archiver | 1999 | 8 | 23-06-2002 23:03 |
| Is it weird to see an atwood motor floating in mid air? | mnkysp6353 | Chit-Chat | 6 | 19-02-2002 21:38 |