I'm trying to set up a structure within a structure, but there's also two dynamic arrays inside:

Code:
struct Sentence {
int numwords; 
char **words;
};

struct Document {
int numLines;
Sentence *sentences;
} Doc;
that's a structure (Doc) with a dynamic structure inside (Sentence *sentences) with a dynamic array inside that (char **words)

The problem is I can't seem to access the char **words portion of the array.

I've set up:
Code:
int len=0;
Doc.sentences = new Sentence[len];
However, I can't seem to be able to figure how to dynamically allocate memory for **words so that it becomes an array of pointers.