You mix C and C++ code, but I prefere only C++.

Michael Jackson wrote:
> 
> This is what I use:
> 
> herr_t H5Lite::readStringDataset(hid_t loc_id, const std::string&  
>      std::vector<char> buf(static_cast<int>(size+1), 0x00); //Allocate  
> and Zero the array
>      err = H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT,  
> &(buf.front()) );
>      if (err<0) {
>        std::cout << "Error Reading string dataset." << std::endl;
>        retErr = err;
>      } else {
>        data.append( &(buf.front()) ); //Append the string to the given  
> string
> 

I don't find any native C++ code to read data into the std::vector. 
-- 
View this message in context: 
http://hdf-forum.184993.n3.nabble.com/HDF5-with-C-tp874249p880263.html
Sent from the hdf-forum mailing list archive at Nabble.com.

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

Reply via email to