/************************************************************ This example shows how to read and write data to an external dataset. The program first writes integers to an external dataset with dataspace dimensions of DIM0xDIM1, then closes the file. Next, it reopens the file, reads back the data, and outputs the name of the external data file and the data to the screen. This file is intended for use with HDF5 Library version 1.8 ************************************************************/ #include "hdf5.h" #include #include #define FILE "h5ex_d_extern.h5" #define EXTERNAL "h5ex_d_extern.data" #define DATASET "DS1" #define DIM0 4 #define DIM1 7 #define NAME_BUF_SIZE 32 int main (void) { hid_t file, space, dset, dcpl; /* Handles */ herr_t status; hsize_t dims[2] = {DIM0, DIM1}; char name[NAME_BUF_SIZE]; int wdata[DIM0][DIM1], /* Write buffer */ rdata[DIM0][DIM1], /* Read buffer */ i, j; /* * Initialize data. */ for (i=0; i