Say we have this for instance:
string* p;
p = new string[2];
p[0] = "Aa";
p[1] = "Bb";
What I understand: I need to create a temp dynamic array to store what p has, delete p, and then create a new p with a row 1 size bigger than temp, and then copy temp into p.
What I do not understand: How would I increase the size of p WITHOUT knowing the original rowsize (in this case 2) and still keep the original data. I've read about doing tricks such as (sizeof(array)/sizeof(dataType)), but since I have a dynamic array, I have no idea how to find it's size. realloc would format my original data, plus it acts funny with strings.
Just a heads up: I do not want to use any form of linked lists, vectors, or things of that nature.