Thanks very much for the fast replies. I took a look at the atoi function in the standard libraries but it has limitations. It returns "0" for a failure but zero is a valid number as well. It also returns a number up to the first invalid number in string format. For example '56xxt' will return 56.
I will try and google "boost" and see if that works for me.