Basics of strtol?
问题 I am really confused. I have to be missing something rather simple but nothing I am reading about strtol() is making sense. Can someone spell it out for me in a really basic way, as well as give an example for how I might get something like the following to work? string input = getUserInput; int numberinput = strtol(input,?,?); 回答1: The first argument is the string. It has to be passed in as a C string, so if you have a std::string use .c_str() first. The second argument is optional, and