What\'s the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of returning zero).
In C, you can use int atoi (const char * str),
int atoi (const char * str)
Parses the C-string str interpreting its content as an integral number, which is returned as a value of type int.