I'm looking at this example
http://hdf-forum.184993.n3.nabble.com/C-API-how-to-write-string-attribute-t t723857.html Which shows me how to write a single string into an HD5 file. I'm not seeing exactly how I would write out a list of strings using the C++ API. Sketching it out, I was following the example for creating datasets of scalars, but I get stuck at how to actually write into the dataset. void WriteVariableLengthStringVector(H5::H5File &output, const std::string &setName, std::vector<std::string> &stringList) { hsize_t numStrings(stringList.size()); H5::DataSpace strSpace(1,&numStrings); H5::StrType strType(0,H5T_VARIABLE); H5::DataSet strSet = output.createDataSet("SubjectIDs",strType,strSpace); // // what's supposed to happen now? strSet.write(????,H5::PredType::C_S1); } ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
