>> this is how you do it in C++
In C++ I'd use an existing string class, and I'd use vector instead of new[]/delete[] anyway. But of course those are also beyond the scope of msh's current learning....