C-strings
C-strings are char
arrays that end in the null terminator (NULL
, 0
, or '\0'
). Pre-defined functions in C and C++ contain logic such that, even if a character array is very large, processing of that array stops when the null terminator is reached.
To convert a C++ string
into a C-string, use the string.c_str()
function.