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

C / C++ / MFC

 
GeneralRe: Howto convert CString to float? Pin
valikac2-Jan-03 16:25
valikac2-Jan-03 16:25 
GeneralRe: Howto convert CString to float? Pin
VanHlebar2-Jan-03 17:03
VanHlebar2-Jan-03 17:03 
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 
Rage wrote:
float fResult=atof((LPCTSTR)str);

This gives the following error:
error C2664: 'atof' : cannot convert parameter 1 from 'const unsigned short *' to 'const char *'

I apologize ahead of time if this makes a difference, but I am compiling this under PocketPC 2002 SDK.

After working somemore lastnight I figured out part of the issue. In my orginal code the call to sprintf() is always returning zero into buf. It works just fine if the user has an whole number in strFloat, but once they enter a decimal number it blowsup, only returning zero into buf.

Thanks for all the help folks. Smile | :) I honestly didn't think this would be that difficult.Blush | :O

-Eric
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 
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 

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.