Quote Originally Posted by turlisk View Post
i have a question about copying a string.

basically i have a function that passes an array of characters, it will be a phone number and i want to copy the numbers into a string in the format of the first 3, then the next three then the last 4.

is there a way to set where i start my copy from in strcpy or is there another function i can use that will assist in doing this?
Is your string a char array, or a string?

If it's a char array, just add the offset for the start position you want to the source pointer you pass to strcpy.

If it's a string, use substr().