title: HDF5 - Creating attributes for groups via code
body: <p>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?). </p>
  
  <p>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. </p>
  
  <p>My code below adds a single group to a new H5 file:</p>
  
  <pre><code>//Create a new file using default properties
  H5File file("NewH5.h5", H5F_ACC_TRUNC);
  
  //Create PLATFORM_t and SONAR_t groups in the file
  Group groupPlatform(file.createGroup("/PLATFORM_t"));
  </code></pre>