HDF5处理字符型或字符串型数据
发布时间
阅读量:
阅读量
HDF5读char*类型或者string类型数据
-
- 一、说明:
- 二、条件设置:
- 三、程序验证:
- 四、执行效果:
- 一、说明:
一、描述:
将存储于.h5格式文件中的char*或string类型数据提取出来,并将其保存至vector容器中。
二、环境因素分析
在Linux系统环境下,所使用的HDF5软件包版本为hdf5-1.10.1.tar.gz。
三、代码测试:
#include <iostream>
#include <vector>
#include <string.h>
#include "H5Fpublic.h"
#include "hdf5.h"
#include "hdf5_hl.h"
using namespace std;
int main(int argc, char *argv[])
{
const char* readH5File = "testWriteh5String.h5"; // 文件在可执行目录下
hid_t hdfId = H5Fopen(readH5File, H5F_ACC_RDONLY, H5P_DEFAULT); // hdfId文件句柄
if(hdf
全部评论 (0)
还没有任何评论哟~
