This is illegal in C++. You might want to turn off the compiler extension that allows it. Array sizes must be compile time constants.
Apparently I can assign the value of the new array to array1 by doing
No, you can't. That sets the local variable string1 to point to nstring. It does not change the c-string fed to the function.
The way strcat is used in C, the caller must ensure that the first parameter points to enough memory to hold both the first string and the string to be concatenated. I would expect an implementation to look something like: