Convert const char* to double

How do I convert const char* to double
LVL 2
wqclatreAsked:
Who is Participating?
 
ozoConnect With a Mentor Commented:
answed
0
 
ozoCommented:
#include <stdlib.h>
double d = atof("1.5");

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


0
 
wqclatreAuthor Commented:
Thanks!

Mark the question as answed!
0
 
wqclatreAuthor Commented:
Thanks for answeing so fast!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.