cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
atoi vs atol vs atof
atoi vs atol vs atof
Dec 15, 2012 at 2:24pm UTC
Imadatobanisa
(647)
Hello everybody and I have a doubt...
What is
atoi - atol
? And
atoi - atol vs atof
?
And, actually I love
atof
. But, my really doubt is "Does the float-double function
atof
perform faster than the integer one?"
In my opinion, I think the "
double
" is better.
Dec 15, 2012 at 4:40pm UTC
S G H
(2638)
Obviously atoi and atol perform (most times) faster than atof, and atof (again most times) performs faster than (suppose it exists) atod.
Anyways you should try [OH GOD]Avoiding[/OH GOD] them. They have no error checkings, you should use strtol/strtod.
http://www.cplusplus.com/reference/cstdlib/strtol/
http://www.cplusplus.com/reference/cstdlib/strtod/
Last edited on
Dec 15, 2012 at 8:03pm UTC
Dec 15, 2012 at 7:16pm UTC
maeriden
(872)
hevitating
Avoiding
*runs away*
Topic archived. No new replies allowed.