how to store a range of cstring values

1
Last edited on
Look at strchr, strrchr and strncpy.

general logic is
1) Locate last occurrence of bracket
2) Locate first occurrence of bracket
3) calculate the difference in the positions of these (say call it diff)
4) use strncpy to copy "diff" number of characters starting from first occurrence
Topic archived. No new replies allowed.