Hello,

I have written a std::string with this code into a HDF5 file:

H5::DataSet l_dataset;
H5::DataSpace l_dataspace;

// create group

l_dataset.write( p_value.c_str(), H5::StrType(l_dataset), l_dataspace );

p_value ist the std::string, which should be written. The l_dataset is an object with the datatype like NATIVE_CHAR.

I write the data "abcd" into the file try reading them in matlab, I get in Matlab an array with [97, 98, 99, 100]. The array has the values of the chars a, b, c, d. How can I write a std::String with the HDF classes into a file?

Thanks

Phil
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to