Click here to Skip to main content
15,914,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: zoom-in & zoom-out Pin
cmk20-Apr-05 22:39
cmk20-Apr-05 22:39 
Generalconvert string to double using strtod() Pin
nehathoma20-Apr-05 20:09
nehathoma20-Apr-05 20:09 
GeneralRe: convert string to double using strtod() Pin
Christian Graus20-Apr-05 20:27
protectorChristian Graus20-Apr-05 20:27 
GeneralRe: convert string to double using strtod() Pin
nehathoma20-Apr-05 20:47
nehathoma20-Apr-05 20:47 
GeneralRe: convert string to double using strtod() Pin
eli1502197920-Apr-05 21:48
eli1502197920-Apr-05 21:48 
GeneralRe: convert string to double using strtod() Pin
James R. Twine21-Apr-05 2:09
James R. Twine21-Apr-05 2:09 
GeneralRe: convert string to double using strtod() Pin
eli1502197921-Apr-05 2:57
eli1502197921-Apr-05 2:57 
GeneralRe: convert string to double using strtod() Pin
James R. Twine21-Apr-05 4:21
James R. Twine21-Apr-05 4:21 
eli15021979 wrote:
Don't you think he should try to do the work by himself?????
I just wanted to give him general direction.


   Given general direction is fine, but at least give proper direction; do not lead someone down a path that will cause them problems in the future.

   -And, actually, your example is wrong, too...! Smile | :)

   You need to pass the address of dNumber to sscanf(...).  Better to use a function designed for this specific purpose, like strtod(...)/_tcstod(...) instead of a more general purpose function, like sscanf(...).

   Calling GetLength() in the context shown above will still return an incorrectly sized buffer.
<br />
double dNumber1 = ::_tcstod( _T( "1234.5678" ) ); <br />
double dNumber2 = ::strtod( "1234.5678" ); <br />

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
GeneralRe: convert string to double using strtod() Pin
Christian Graus21-Apr-05 12:56
protectorChristian Graus21-Apr-05 12:56 
GeneralRe: convert string to double using strtod() Pin
ThatsAlok20-Apr-05 21:42
ThatsAlok20-Apr-05 21:42 
GeneralRe: convert string to double using strtod() Pin
nehathoma20-Apr-05 22:19
nehathoma20-Apr-05 22:19 
GeneralRe: convert string to double using strtod() Pin
Chris Losinger21-Apr-05 1:37
professionalChris Losinger21-Apr-05 1:37 
QuestionHow to prevent others to stop my service? Pin
sharkmouse20-Apr-05 19:23
sharkmouse20-Apr-05 19:23 
AnswerRe: How to prevent others to stop my service? Pin
cmk20-Apr-05 22:53
cmk20-Apr-05 22:53 
GeneralSoft Modems Pin
TOMCAT8120-Apr-05 19:11
TOMCAT8120-Apr-05 19:11 
GeneralLog File.. Pin
mpallavi20-Apr-05 18:59
mpallavi20-Apr-05 18:59 
GeneralRe: Log File.. Pin
Christian Graus20-Apr-05 20:29
protectorChristian Graus20-Apr-05 20:29 
GeneralRe: Log File.. Pin
mpallavi20-Apr-05 20:41
mpallavi20-Apr-05 20:41 
GeneralRe: Log File.. Pin
PJ Arends21-Apr-05 7:16
professionalPJ Arends21-Apr-05 7:16 
Generalscrolling MDI CHILD windows Pin
laiju20-Apr-05 18:24
laiju20-Apr-05 18:24 
GeneralHelp Immediate for refreshing screen Pin
popo8420-Apr-05 16:05
popo8420-Apr-05 16:05 
GeneralRe: Help Immediate for refreshing screen Pin
oustar20-Apr-05 17:56
oustar20-Apr-05 17:56 
GeneralDisabling Spell Checker Pin
rjnl20-Apr-05 15:50
rjnl20-Apr-05 15:50 
GeneralReal time display Pin
Francis Chau20-Apr-05 15:24
Francis Chau20-Apr-05 15:24 
GeneralRe: Real time display Pin
Christian Graus20-Apr-05 15:38
protectorChristian Graus20-Apr-05 15:38 

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.