M
Mathieu Malaterre
Hello,
I guess this might be a very dummy question, but I couldn't find an
answer in the group's archive.
I am reading DICOM files, and to store the string read I use
std::string. Unfortunately there is case where the string can be '\0\0'
Is this a defined bahavior when you do this kind of operation :
const char *s = "\0\0";
std::string a = s; //how many character will be copied
Is there a work around other than subclassing std::string to handle
properly \0 ? Knowing that I can carry the 'real' lenght around, my main
concern is how do I fill a std::string with x number of \0 ?
Thanks
Mathieu
I guess this might be a very dummy question, but I couldn't find an
answer in the group's archive.
I am reading DICOM files, and to store the string read I use
std::string. Unfortunately there is case where the string can be '\0\0'
Is this a defined bahavior when you do this kind of operation :
const char *s = "\0\0";
std::string a = s; //how many character will be copied
Is there a work around other than subclassing std::string to handle
properly \0 ? Knowing that I can carry the 'real' lenght around, my main
concern is how do I fill a std::string with x number of \0 ?
Thanks
Mathieu