/* * Aaron Weeden, Shodor, May 2014 */ #include const int N_ROWS = 3; const int N_COLS = 4; int main() { hid_t file_id, dataset_id, dataspace_id; hsize_t dims[2] = {N_ROWS, N_COLS}; file_id = H5Fcreate("empty-dataset.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); dataspace_id = H5Screate_simple(2, dims, NULL); dataset_id = H5Dcreate2(file_id, "/empty-dataset", H5T_STD_I32BE, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dclose(dataset_id); H5Sclose(dataspace_id); H5Fclose(file_id); return 0; }