Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LPTSTR to float Pin
Cool Ju5-Dec-05 23:58
Cool Ju5-Dec-05 23:58 
GeneralRe: LPTSTR to float Pin
paper676-Dec-05 0:08
paper676-Dec-05 0:08 
AnswerRe: LPTSTR to float Pin
Member 15877415-Dec-05 23:45
Member 15877415-Dec-05 23:45 
GeneralRe: LPTSTR to float Pin
paper675-Dec-05 23:53
paper675-Dec-05 23:53 
AnswerRe: LPTSTR to float Pin
ThatsAlok6-Dec-05 0:53
ThatsAlok6-Dec-05 0:53 
GeneralRe: LPTSTR to float Pin
paper676-Dec-05 2:49
paper676-Dec-05 2:49 
GeneralRe: LPTSTR to float Pin
ThatsAlok6-Dec-05 2:55
ThatsAlok6-Dec-05 2:55 
AnswerRe: LPTSTR to float Pin
Bob Ciora6-Dec-05 1:16
Bob Ciora6-Dec-05 1:16 
How about the old standby, sscanf? There is also a wide-character version, swscanf. If you've eliminated the whitespace around the string-represented floating-point value, then the following will work:

// input: CString sData

float fValue;

// sscanf will return the number of items pulled out of the string
int nResult = sscanf((LPCTSTR)sData, "%f", &fValue);
if( nResult != 1 )
{
    // Didn't find a floating-point value.  Take corrective action...
}




Bob Ciora
AnswerRe: LPTSTR to float Pin
Rage6-Dec-05 1:32
professionalRage6-Dec-05 1:32 
QuestionRE: lib for usb cam video capture Pin
9ine5-Dec-05 22:59
9ine5-Dec-05 22:59 
AnswerRe: RE: lib for usb cam video capture Pin
victoryelectorn12-Dec-05 18:28
victoryelectorn12-Dec-05 18:28 
QuestionHow to show the Sound Selection Dialog by calling Windows API Pin
Albert19865-Dec-05 22:38
Albert19865-Dec-05 22:38 
AnswerRe: How to show the Sound Selection Dialog by calling Windows API Pin
Blake Miller6-Dec-05 9:53
Blake Miller6-Dec-05 9:53 
QuestionCoppying a VARIANT help required Pin
arusmemon5-Dec-05 22:37
arusmemon5-Dec-05 22:37 
AnswerRe: Coppying a VARIANT help required Pin
toxcct5-Dec-05 22:47
toxcct5-Dec-05 22:47 
Questionterminating execution of exe Pin
shadrach_india5-Dec-05 22:21
shadrach_india5-Dec-05 22:21 
AnswerRe: terminating execution of exe Pin
Khan Shere5-Dec-05 22:43
Khan Shere5-Dec-05 22:43 
AnswerRe: terminating execution of exe Pin
khan++5-Dec-05 22:44
khan++5-Dec-05 22:44 
AnswerRe: terminating execution of exe Pin
toxcct5-Dec-05 22:44
toxcct5-Dec-05 22:44 
GeneralRe: terminating execution of exe Pin
Cool Ju5-Dec-05 22:57
Cool Ju5-Dec-05 22:57 
GeneralRe: terminating execution of exe Pin
ThatsAlok5-Dec-05 23:16
ThatsAlok5-Dec-05 23:16 
GeneralRe: terminating execution of exe Pin
Cool Ju5-Dec-05 23:32
Cool Ju5-Dec-05 23:32 
QuestionProblem with windows 98 and MFC Pin
Arrun5-Dec-05 19:55
Arrun5-Dec-05 19:55 
AnswerRe: Problem with windows 98 and MFC Pin
sunit55-Dec-05 21:19
sunit55-Dec-05 21:19 
GeneralRe: Problem with windows 98 and MFC Pin
ThatsAlok5-Dec-05 23:32
ThatsAlok5-Dec-05 23:32 

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.