Hacker News new | ask | show | jobs
by zainny 4928 days ago
Fortunately with C++11 we no longer have to do the stringstream dance thanks to built-in stoi/stol string member functions: http://en.cppreference.com/w/cpp/string/basic_string/stol
1 comments

Technically, those are free functions defined on strings, not members functions of the class string.

But also: std::to_string

http://en.cppreference.com/w/cpp/string/basic_string/to_stri...