Strings using <cstring>

If I have a string with no spaces (\0) in it, how can i break up the string into to separate strings:

Say I have cin << fullname (with a comma between last and first names, no spaces)

How can I break up fullname into last_name and first_name?
Your << should be going the first name.

Anyway, just search through the string until you find the ',', then take the first part and strcpy it to last name, then the rest and put it into first name.
Topic archived. No new replies allowed.