typedef basic_string<char> string;
All the std::string
facilities in the standard library are using char
. Why is that? Although all the characters of the ASCII table (128) fit into the range of a char
(-128 to 127), many other character encodings are using 8-bits for representation.
What is the advantage of having 'negative' values in a string of chars?