
Keith B. answered 08/22/19
Software Engineer and Math Geek
So many questions, but first off -- does the string contain more than just the numbers you're trying to convert? The function atoi() is the easiest way to convert, even with a minus sign, but if there is other text involved then you'll have to parse out the values you want (I'd suggest looking into regex but that's a heady can of worms you won't want to open).