Click here to Skip to main content
16,011,428 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Howto convert CString to float? Pin
valikac2-Jan-03 17:09
valikac2-Jan-03 17:09 
GeneralRe: Howto convert CString to float? Pin
Gary Kirkham2-Jan-03 17:02
Gary Kirkham2-Jan-03 17:02 
GeneralRe: Howto convert CString to float? Pin
ashxly2-Jan-03 18:53
ashxly2-Jan-03 18:53 
GeneralRe: Howto convert CString to float? Pin
Rage2-Jan-03 20:33
professionalRage2-Jan-03 20:33 
GeneralRe: Howto convert CString to float? Pin
xxhimanshu2-Jan-03 21:57
xxhimanshu2-Jan-03 21:57 
GeneralRe: Howto convert CString to float? Pin
VanHlebar3-Jan-03 1:42
VanHlebar3-Jan-03 1:42 
GeneralRe: Howto convert CString to float? Pin
Tim Smith3-Jan-03 2:36
Tim Smith3-Jan-03 2:36 
GeneralRe: Howto convert CString to float? Pin
VanHlebar3-Jan-03 2:39
VanHlebar3-Jan-03 2:39 
Tim Smith wrote:
The problem is you are working with UNICODE strings and trying to use the ANSI conversion routine. That is just silly. As people have already said, use the UNICODE conversion routine "wtof".

float fResult = wtof (str);

That will work just fine.

Tim Smith


Tim,

Thanks for the suggestion. The wtof function works fine, but it truncates the value to a whole number. I lose the precision after the decimal if I use this function. I need a value going out only to the tenths, but I do need to keep the one decimal place.

-Eric
GeneralRE: getting pixel values Pin
n27414152-Jan-03 15:16
n27414152-Jan-03 15:16 
GeneralRe: RE: getting pixel values Pin
ashxly2-Jan-03 15:44
ashxly2-Jan-03 15:44 
QuestionHow can I pick the object in a 3D scene via the mouse? Pin
stanley guan2-Jan-03 14:01
stanley guan2-Jan-03 14:01 
AnswerRe: How can I pick the object in a 3D scene via the mouse? Pin
Tim Smith2-Jan-03 14:08
Tim Smith2-Jan-03 14:08 
GeneralChange the "friendly" name of a network drive Pin
Jan R Hansen2-Jan-03 13:00
Jan R Hansen2-Jan-03 13:00 
GeneralDigital Signal Processing Pin
progman2-Jan-03 11:53
progman2-Jan-03 11:53 
GeneralRe: Digital Signal Processing Pin
Brian Tietz2-Jan-03 12:30
Brian Tietz2-Jan-03 12:30 
GeneralRe: Digital Signal Processing Pin
progman2-Jan-03 14:31
progman2-Jan-03 14:31 
GeneralRe: Digital Signal Processing Pin
Brian Tietz2-Jan-03 15:09
Brian Tietz2-Jan-03 15:09 
GeneralRe: Digital Signal Processing Pin
Tim Smith2-Jan-03 12:55
Tim Smith2-Jan-03 12:55 
GeneralRe: Digital Signal Processing Pin
progman2-Jan-03 14:36
progman2-Jan-03 14:36 
GeneralRe: Digital Signal Processing Pin
Tim Smith2-Jan-03 15:27
Tim Smith2-Jan-03 15:27 
Generalgethostbyaddress AND 11004 Pin
(Steven Hicks)n+12-Jan-03 11:08
(Steven Hicks)n+12-Jan-03 11:08 
GeneralRe: gethostbyaddress AND 11004 Pin
Brian Tietz2-Jan-03 11:37
Brian Tietz2-Jan-03 11:37 
GeneralRe: gethostbyaddress AND 11004 Pin
(Steven Hicks)n+12-Jan-03 11:57
(Steven Hicks)n+12-Jan-03 11:57 
GeneralRe: gethostbyaddress AND 11004 Pin
(Steven Hicks)n+12-Jan-03 11:57
(Steven Hicks)n+12-Jan-03 11:57 
GeneralOff the top of your head... Pin
Martin Marvinski2-Jan-03 10:15
Martin Marvinski2-Jan-03 10:15 

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.