Heya. I decided to make a simple CMD like program today, so I made a very simple String to Char array converter. However, whenever I use it, it returns a char array with the allocated length of the string (which is good), yet without spacing!
You didn't put a zero terminator at the end of your cstring which is required to mark the end:
1 2 3 4 5
cInput = newchar[sInput->length() + 1]; // NOTE: + 1 to allow for the zero
for(unsignedint i = 0; i < sInput->length(); i++)
cInput[i] = (*sInput)[i];
cInput[sInput->length()] = '\0'; // Add the terminating zero