I know this is not what you're asking ... and I know this doesn't really help you with your problem...
... but passing ownership of allocated memory is a
terrible idea. It is very easy to lose track of who owns the memory, leaving you open to leaks, duplicate deletes, or allocating deleted memory -- all of which are terrible, hard to find bugs.
Don't use new/delete unless you have to (and when you do, use smart pointers -- you should almost never be using 'delete' manually). If you need a dynamic array of dynamically sizable strings, don't use a 2D char array, use a vector of strings:
This solves
so many problems before they start, and makes your overall code easier to write, read, and understand.
EDIT:
Aw crap... I just realized this is for a homework assignment and you have to use 2D char arrays.
Good God I wish classes would stop teaching horrible, horrible practices. This is inexcusable in C++. You should never, ever do this in production code.