I am trying to make a **array that holds a char*array and was wondering how I would do that. I wanted to do something like child **parent=new child*; but that isn't possible. The problem is I can't use the STL (no strings, no vectors) and that means array of char. But that is hard cause I have no idea how you create a unique instance of every child char. If you do something like
then all that happens is every instance of parent[x] becomes the most recent child since they are all pointing to child. But what can you do with child when it has to be a dynamically allocated array to save on wasted memory. Even if you didn't dynamically allocate you would still have to come up with a way to create a unique instance of child. Any advice would be great, thanks!