cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
problem with _atold and strtold
problem with _atold and strtold
Jul 24, 2011 at 5:30am UTC
Baso
(47)
My compiler doesn't recognize the conversion string functions
_atold()
or
strtold()
I included the header
#include<cstdlib>
and
#include<stdlib.h>
I'm using Microsoft visual studio 2010.
Any tips please to convert string to long double.
Thanks.
Jul 24, 2011 at 6:03am UTC
Turbine
(134)
"atod()" is not recognized either? I'm not familiar with the VS facilities, if you really can't figure it out, you can always use boost libraries lexial_cast.
boost::lexial_cast<double>("5.22")
http://www.boost.org/doc/libs/1_47_0/libs/conversion/lexical_cast.htm
I do not recommended this your use.
Jul 24, 2011 at 8:04am UTC
Baso
(47)
Thanks Turbine for your replies
I fixed it by using
stold()
function to convert string to
long
double
.
Thanks
Topic archived. No new replies allowed.