------- Additional Comments From pcarlini at suse dot de 2005-04-28 09:25 ------- There is nothing wrong with a null char per se. The problem is that you second constructor call is wrong: according to the standard, there is *no* constructor taking a const char*, and two size_type. Instead, there is one taking a string and two size_type. Therefore, your str.data() is used to construct a temporary string (only 6 char long, because the constructor taking a "C" string is used) and then invoke the constructor mentioned above. Fix your code like this:
string str2(str, 10, str.size() - 10); -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21262