I just fixed a bug. Namely, the C++ function:
void returnCharPtr(char * someString, int n);
cannot return any
CharPtr because the
someString pointer is passed by value. Also, the intent of the author was clear:
So, another option is to pass the parameter as an argument, so you process your string in a function but don't create a new copy.
But as the change was rejected (3 vs 2) the post stayed in an incorrect state (IMHO).
I left a comment to the author. Can I argue with the editors' decision?