I'm currently learning HDF5 and need to figure out how to add attributes to an empty group with C++. I know how to do it via HDFView, but I can't seem to find any documentation about adding attributes to a simple group, only datasets (is this even possible?).
In HDFView, if you add a group then right-click that group and select "Show properties", a new window will pop up with tabs for 'General' and 'Attributes'. In the 'Attributes' tab you can add multiple attributes. I basically want to do this, but through code.
My code below adds a single group to a new H5 file:
//Create a new file using default properties
H5File file("NewH5.h5", H5F_ACC_TRUNC);
//Create PLATFORM_t and SONAR_t groups in the file