Solved

Convert const char* to double

Posted on 1997-12-17
4
1,096 Views
Last Modified: 2008-02-01
How do I convert const char* to double
0
Comment
Question by:wqclatre
  • 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 30 total points
ID: 1176575
answed
0
 
LVL 2

Author Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now