A nice comparison on converting a string to int:
C++ String to Int
by Ivan Neeson
From the article:
In this post I will compare the following methods for parsing a string into an integer in C++:
- Manually
atoi()strtol()sscanf()std::stoi(C++11 only)std::istringstream- Boost.LexicalCast
- Boost.LexicalCast with C locale
- Boost.Spirit.Qi
- Boost.Coerce

Add a Comment
Comments are closed.