![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 155
Rep Power: 3
![]() |
float - cut down digts?
you know if you do float x = 12/12.0;
it'll give you x = 1.00000 now what do i do if i want to cout the result at 1.0 do I have to convert x into a string and take out "characters" or what? that just doesnt sound very sophiscated i feel there is better approach to it? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I take a square root? | Fall Back Son | C | 26 | Oct 23rd, 2006 1:24 PM |
| converting string to float | beginnerCCC | C | 22 | Oct 3rd, 2006 12:59 AM |
| PLEASE HELP Convert FLOAT to STRING | Pedro | C | 2 | May 23rd, 2005 11:55 AM |
| Two ints divided into a float. | Dygear | C++ | 2 | Apr 1st, 2005 6:42 PM |
| float precision and MFC... | Racine_ | C++ | 0 | Feb 5th, 2005 9:31 AM |