As mentioned in the title, I\'m looking for something that can give me more performance than atoi. Presently, the fastest way I know is
atoi(mystring.c_str(
Why not use a stringstream? I'm not sure of its particular overhead, but you could define:
int myInt; string myString = "1561"; stringstream ss; ss(myString); ss >> myInt;
Of course, you'd need to
#include