Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where should I store application's shared config file that are the same for all user of windows in VISTA Pin
bob1697223-Jun-08 8:08
bob1697223-Jun-08 8:08 
QuestionMFC update: how to disable loading pane docking state from registry Pin
roel_21-Jun-08 6:28
roel_21-Jun-08 6:28 
AnswerRe: MFC update: how to disable loading pane docking state from registry Pin
bolivar12321-Jun-08 12:01
bolivar12321-Jun-08 12:01 
GeneralRe: MFC update: how to disable loading pane docking state from registry Pin
roel_22-Jun-08 2:02
roel_22-Jun-08 2:02 
QuestionWhat's the difference between function atof() and _tstof()? Pin
liuxianming200121-Jun-08 6:08
liuxianming200121-Jun-08 6:08 
AnswerRe: What's the difference between function atof() and _tstof()? Pin
Ștefan-Mihai MOGA21-Jun-08 6:20
professionalȘtefan-Mihai MOGA21-Jun-08 6:20 
AnswerRe: What's the difference between function atof() and _tstof()? Pin
Dan21-Jun-08 8:08
Dan21-Jun-08 8:08 
QuestionConvert CString to double Pin
bkelly1321-Jun-08 4:27
bkelly1321-Jun-08 4:27 
I am trying to figure out how to convert text in a CString to a double. I found this tutorial:
http://www.codeproject.com/KB/string/cstringmgmt.aspx#Converting%20a%20CString%20to%20an%20integer
and it contains this example code for converting to an integer

CString hex = _T("FAB");
CString decimal = _T("4011");
ASSERT(_tcstoul(hex, 0, 16) == _ttoi(decimal));

I don’t even see an integer declared in that fragment, much less how to convert the CString to an integer or decimal.

Here is what I need:

CString source = _T("1.2e6");
double target;
target = source.FormatAsDouble();

Obviously that does not work. But what will?

Thanks for your time

AnswerRe: Convert CString to double Pin
bkelly1321-Jun-08 4:30
bkelly1321-Jun-08 4:30 
GeneralRe: Convert CString to double Pin
Ștefan-Mihai MOGA21-Jun-08 4:33
professionalȘtefan-Mihai MOGA21-Jun-08 4:33 
GeneralRe: Convert CString to double Pin
bkelly1321-Jun-08 4:42
bkelly1321-Jun-08 4:42 
GeneralRe: Convert CString to double Pin
Ștefan-Mihai MOGA21-Jun-08 4:47
professionalȘtefan-Mihai MOGA21-Jun-08 4:47 
GeneralRe: Convert CString to double Pin
bkelly1321-Jun-08 6:27
bkelly1321-Jun-08 6:27 
GeneralRe: Convert CString to double Pin
Ștefan-Mihai MOGA21-Jun-08 6:42
professionalȘtefan-Mihai MOGA21-Jun-08 6:42 
GeneralRe: Convert CString to double Pin
bkelly1321-Jun-08 16:05
bkelly1321-Jun-08 16:05 
GeneralRe: Convert CString to double Pin
Ștefan-Mihai MOGA21-Jun-08 20:18
professionalȘtefan-Mihai MOGA21-Jun-08 20:18 
GeneralRe: Convert CString to double Pin
bkelly1322-Jun-08 2:44
bkelly1322-Jun-08 2:44 
GeneralRe: Convert CString to double Pin
CPallini21-Jun-08 4:48
mveCPallini21-Jun-08 4:48 
GeneralRe: Convert CString to double Pin
bkelly1321-Jun-08 4:51
bkelly1321-Jun-08 4:51 
GeneralRe: Convert CString to double Pin
CPallini21-Jun-08 6:41
mveCPallini21-Jun-08 6:41 
GeneralRe: Convert CString to double Pin
bkelly1321-Jun-08 7:18
bkelly1321-Jun-08 7:18 
GeneralRe: Convert CString to double Pin
CPallini22-Jun-08 0:42
mveCPallini22-Jun-08 0:42 
GeneralSomebody voted me down for playing with you. Pin
Rajesh R Subramanian26-Jun-08 0:24
professionalRajesh R Subramanian26-Jun-08 0:24 
GeneralRe: Somebody voted me down for playing with you. Pin
CPallini26-Jun-08 1:00
mveCPallini26-Jun-08 1:00 
GeneralRe: Somebody voted me down for playing with you. Pin
Rajesh R Subramanian26-Jun-08 1:10
professionalRajesh R Subramanian26-Jun-08 1:10 

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.