Next: nc_def_grp, Previous: nc_inq_grpname_len, Up: Groups
Given ncid, find the ncid of the parent group.
When used with the root group, this function returns the NC_ENOGRP error (since the root group has no parent.)
int nc_inq_grp_parent(int ncid, int *parent_ncid);
ncidparent_ncidNC_NOERRNC_EBADIDNC_ENOGRPNC_ENOTNC4NC_ESTRICTNC3NC_EHDFERR if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
if (nc_def_grp(ncid, HENRY_VII, &henry_vii_id)) ERR;
if (nc_inq_grp_parent(henry_vii_id, &parent_ncid)) ERR;
if (parent_ncid != ncid) ERR;
if (nc_close(ncid)) ERR;