stdstring和hdf5的问题
Problems with stdstring and hdf5
我正在使用Microsoft Visual Studio 2008 (HDF5 v1.8.12),我对H5std_string作为参数的每个函数都有问题。
甚至当我运行示例文件"create.cpp"时也是如此。https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/c + +/例子/create.cpp
这给了我错误:.... h5fc在H5Fcreate()中的第1466行:无效的文件名当我用FILE_NAME.c_str()
替换FILE_NAME
时,错误是固定的DATASET_NAME
与DATASET_NAME.c_str()
类似地,当运行 时,我得到一个错误:
H5::Attribute attr = group.openAttribute("type");
H5std_string attr_content;
attr.read(attr.getStrType(), attr_content);
但是下面的代码可以工作
char buf[1024];
H5::Attribute attr = group.openAttribute("type");
attr.read(attr_date.getStrType(), buf);
在Visual Studio切换到发布模式时,下面显示的错误消失了。
在hdf5中使用std:: string会产生不可读的输出
相关文章:
- 警告处理为错误这里有什么问题
- 最小硬币更换问题(自上而下方法)
- 为"adjacent"变量赋值时出现问题
- 我的神经网络不起作用 [XOR 问题]
- 在Ubuntu 16.04上安装Cilk时出现问题
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 编译包含字符串的代码时遇到问题
- Project Euler问题4的错误解决方案
- 问题:什么是QAbstractItemView::NoEditTriggers的反面
- 在编译C++代码(具有dlib和opencv)到WASM时面临问题
- 在进程中对同一管道进行读取和写入时C++管道出现问题
- 静态数据成员的问题-修复链接错误会导致编译器错误
- C++ 雷神库 - 使用资源加载器类时出现问题(不命名类型)
- 一个关于在C++中重载布尔运算符的问题
- 首要问题的答案让值班员搞错了
- setlocale的C++土耳其字符串问题
- 如何重构类层次结构以避免菱形问题
- HDF5 C++的链接器问题
- 将hdf5读入有内存问题的c++
- stdstring和hdf5的问题