Suppose I have a string that is defined at runtime. I want to create an array of pointers that points to the first character of each word in the string (assume a word is a series of characters delimited by whitespace). Is there a way to determine how big this array will need to be, so I can allocate the appropriate amount of memory for the pointers, without knowing exactly how many words there are in the string? If not, how would one go about creating this array?
Thanks in advance.