Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string to double cast operation..

Status
Not open for further replies.

ericxbenoit

Programmer
Nov 4, 2001
5
0
0
CA
Hi,

I would like to cast a string to get a double.

For example I have myString = "23.34" and I want to get myDouble = 23.34
 
It is not possible to cast string to a double value in the way you suggest. However, you can convert it with the following function from <stdlib.h>

double atof(const char *s) //ascii to float

paulf

 
That's from double to string, not from string to double...
 
Uups, sorry, I was out of my mind when I answered this :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top