I have to write some classes which might be usefull for programming text editor. For now I have two classes: Document and Page. I want Document to have field keeping adresses to Page objects, each for new page. First page will be created in Document constructor, next with create_page() (Document's method).
For now I have declared
Page* pages[99999];
and I write to it by
Document::pages[0] = new Page;
and it works, but I know it's quite wrong. Any ideas how should it look like?
Thanks!