?
Solved

Convert const char* to double

Posted on 1997-12-17
4
Medium Priority
?
1,119 Views
Last Modified: 2008-02-01
How do I convert const char* to double
0
Comment
Question by:wqclatre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1176573
#include <stdlib.h>
double d = atof("1.5");

#include <stdio.h>
sscanf("1.5","%lf",&d);


0
 
LVL 2

Author Comment

by:wqclatre
ID: 1176574
Thanks!

Mark the question as answed!
0
 
LVL 84

Accepted Solution

by:
ozo earned 120 total points
ID: 1176575
answed
0
 
LVL 2

Author Comment

by:wqclatre
ID: 1176576
Thanks for answeing so fast!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question