You would have to search for the next ' ' character in your string again, basically updating your pointer to stop when it reaches it, as you did for the first name, printing the middle characters. Then you will be able to print the remainder as the last name.
well, you see I can not use loop to find the next space. is there a way by findinf the length of the first name and space and subtract the full name to another variable and then find the 2nd space.
Just so you know, it's not considered polite to post a question in more than one forum. Naughty, naughty...
You need to choose which is the best forum for your question and post it once.
In this case the beginners forum was the right place (and you'll notice I answered it there) but cross-posting to more than one forum will simply annoy people and you'll only get rude responses, if any at all.
Yup, something like that was what I was thinking, although you don't have to create a second variable called spacepos2, you can merely overwrite the spacepos variable, unless it is going to be recalled again.