Click here to Skip to main content
15,916,846 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionXML reply from router? Pin
Kuniva13-Nov-03 9:17
Kuniva13-Nov-03 9:17 
GeneralFlatScrollBar Pin
Tzunga Ma13-Nov-03 9:08
sussTzunga Ma13-Nov-03 9:08 
GeneralOutput file Pin
Anonymous13-Nov-03 8:13
Anonymous13-Nov-03 8:13 
GeneralRe: Output file Pin
David Crow13-Nov-03 9:00
David Crow13-Nov-03 9:00 
GeneralRe: Output file Pin
Anonymous13-Nov-03 9:05
Anonymous13-Nov-03 9:05 
GeneralRe: Output file Pin
David Crow13-Nov-03 9:10
David Crow13-Nov-03 9:10 
GeneralStretchDIBits problem with 16-bit (65536) color Pin
tchu13-Nov-03 7:31
tchu13-Nov-03 7:31 
GeneralFloat Roading. Pin
Mike Doner13-Nov-03 7:08
Mike Doner13-Nov-03 7:08 
Hi Guys,

I'm having a heck of a time doing some rounding here, hoping someone has a quick solution.

Example:

CHAR string[xx] = "1.019", null terminated string holding the current release.
FLOAT instver, intended to hold the float value of string ( I want it to be 1.019 )

When I do:

sscanf ( string, "%5lf", &instver );

My result is always: 1.0189999

I've tried:

instver = atof ( string );

And I still get the same results. I've done some peeking around the helpfile, can't find anything that will let me truncate/round the decimal spots.

Anybody?
Thx.
Mike.


GeneralRe: Float Roading. Pin
JWood13-Nov-03 8:42
JWood13-Nov-03 8:42 
GeneralMerge sort Pin
Azury13-Nov-03 6:53
Azury13-Nov-03 6:53 
GeneralRe: Merge sort Pin
Dhakad13-Nov-03 20:16
Dhakad13-Nov-03 20:16 
Generalshow fields from a table on a Listbox Control using MFC VC++ Pin
swerajan13-Nov-03 5:32
swerajan13-Nov-03 5:32 
GeneralRe: show fields from a table on a Listbox Control using MFC VC++ Pin
David Crow13-Nov-03 9:04
David Crow13-Nov-03 9:04 
GeneralRe: show fields from a table on a Listbox Control using MFC VC++ Pin
valikac13-Nov-03 9:07
valikac13-Nov-03 9:07 
GeneralRe: show fields from a table on a Listbox Control using MFC VC++ Pin
David Crow13-Nov-03 9:12
David Crow13-Nov-03 9:12 
GeneralLPCOLESTR Pin
act_x13-Nov-03 5:24
act_x13-Nov-03 5:24 
GeneralRe: LPCOLESTR Pin
Michael Dunn13-Nov-03 8:08
sitebuilderMichael Dunn13-Nov-03 8:08 
Generalthread exit with code 13 Pin
avallet13-Nov-03 4:30
avallet13-Nov-03 4:30 
GeneralRe: thread exit with code 13 Pin
Michael Dunn13-Nov-03 8:09
sitebuilderMichael Dunn13-Nov-03 8:09 
GeneralWM_CTRLCOLOR Pin
Alton Williams13-Nov-03 3:51
Alton Williams13-Nov-03 3:51 
GeneralRe: WM_CTRLCOLOR Pin
Steve S13-Nov-03 4:29
Steve S13-Nov-03 4:29 
Generalpositioning problem Pin
ns13-Nov-03 3:45
ns13-Nov-03 3:45 
GeneralRe: positioning problem Pin
Ravi Bhavnani13-Nov-03 5:23
professionalRavi Bhavnani13-Nov-03 5:23 
AnswerRe: How can I Enable Drag&Drop of IE URL's in my prog Pin
Mike Dimmick13-Nov-03 3:34
Mike Dimmick13-Nov-03 3:34 
GeneralStrange network speed question Pin
Mathias S.13-Nov-03 3:09
Mathias S.13-Nov-03 3:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.