I'm trying to write a program that does the following:
* Ability to enter in phone numbers using a sentinel-controlled while loop.
* The loop will end when the user keys in -1 (or something).
THE PART I CANNOT FIGURE OUT:
I need to divide a phone number into 3 tokens using strtok. I do not have a problem doing this if the delimeter is the same, but it's not. The phone # is in the following format: '(999) 555-1212'. So the delimeters would be a " " a "-" and probably the remainder... I'm just not sure how to go about setting this up. Any help would be appreciated!
Thanks!
Pirigyi
* Ability to enter in phone numbers using a sentinel-controlled while loop.
* The loop will end when the user keys in -1 (or something).
THE PART I CANNOT FIGURE OUT:
I need to divide a phone number into 3 tokens using strtok. I do not have a problem doing this if the delimeter is the same, but it's not. The phone # is in the following format: '(999) 555-1212'. So the delimeters would be a " " a "-" and probably the remainder... I'm just not sure how to go about setting this up. Any help would be appreciated!
Thanks!
Pirigyi