The character of the specified location cannot be directly accessed directly, all to get the string pointer to getBuffer, then add a carriage return at the end of the string, the wrap character (the ASCII code of the Enter is 13, the wrap ASCII code is 10);
Example code:
CSTRING STRTEMP; LPTSTR PSTR;
INT Nlen = strTemp.getLength (); pstr = strTemp.getBuffer (Nlen 2); PSTR [NLEN] = 13; PSTR [NLEN 1] = 10; strTemp.ReleaseBuffer ();