I think I figured it out I will search using String::Find, and grab the int using an end iterator, I was over thinking it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
string::iterator it;
string a ("John");
string b ("John 48");
size_t found;
int begin;
char b[10];
int i;
found=a.find(b);
if (found!=string::npos){
begin = int(found) + a.size();
for ( it=begin; it < str.end(); it++ )
b[it] = *it;
i = atoi(b)
}
Correct me if I am wrong, I am away from my computer.