Help creating function

Sep 1, 2016 at 3:08am
i need to write a function which doubles the size of a dynamic array of string. The existing array may have data. In this case, i need to be sure to copy the data to the new array. any hints?

Sep 1, 2016 at 5:31am
This is how you could copy oldArr to newArr.
1
2
3
for ( int i = 0; i < oldArrSize; i++ ) {
	newArr[i] = oldArr[i];
}
Sep 1, 2016 at 6:34am
Thanks. Now to double a dynamic array is my next step.
Topic archived. No new replies allowed.