Not sure if you're right...
Are you referring to object.str?
If so, yes, that pointer is initialized to NULL, however before I start adding characters, I first allocate it a "new" spot in memory. Then I de-reference (i.e. access the memory location pointed at by that pointer) and start adding characters to it.
Code:
stringStruct object;
object.str = new string;
*object.str = "Yes, a string...\n";
*object.str += "Yes, another string...\n";
*object.str += "Yes, even another string...\n";
I next get the size of that string, then loop through it with the first for loop, incrementing the "sizeOfArrayOfPointers" variable value by 1 each loop, while the current character of the string does not equal a '\n' character so as to get the size of the string, minus the new-line characters. I next use that size to create the array of pointers. The second for loop next moves through the str, adding each character to another string (called "anotherStr" for convenience) as long as the current character is not a new-line character. The resulting string pointed at by "object.anotherStr" is next assigned to the current element of the array of pointers (or to put it another way, the current pointer element of the pointer array is assigned the memory address of the anotherStr). This does this as long as i < sizeOfStr. And there we have the problem...
I should be doing it as long as i < sizeOfArrayOfPointers instead.
EDIT: Hmm...that made no difference. Still, a seg-fault.