I cannot understand if char * returned from string.c_str() points to the same buffer (and not making any copy) how is it null terminated? does the function add null-terminator in the end of string? and what happens if buffer doesn't have any extra bytes to store it?
thanks.