Is std::string supposed to hold a set of characters in Ascii encoding on all platforms and standard compilers?
In other words, can I be sure that my C++ program will get a set of Ascii characters if I do this:
std::string input; std::getline(std::cin, input); EDIT:
In more accurate words, I want to make sure that if the user enter "a0" I will get a std::string with two elements. The first one is 97 and the second is 48
std::string xml. Does the compiler or the STL enforce that there is only XML strings inside?" - No. The type is `char' not "XML" or "Unicode". Don't confuse type, format or encoding. There is a valid question in there though: "How can I control the standard IO encoding?"