> We are using HDF 1.8.5 compiled with Visual Studio 2010 on windows
> 2000 32 bit, and getting a bad pointer when trying to read the name
> for a group attribute. The program crashes on gAttriName.compare
> because gAttriName is a bad pointer. It is confusing because the
> number of attributes read for the group is correct it just seems like
> it cannot read the attribute name for some reason. Any thoughts?
> Thanks
>
>
> Portion of code
>
> //--------------------------------------------------------------------
> ------
> // Open the group name where datasets are stored in the file
> //--------------------------------------------------------------------
> ------
> Group group = file.openGroup(GRP_NAME.c_str());
>
>
> int k;
>
> // loop through all the atttributes in the group
> for (k = 0; k < group.getNumAttrs(); k++)
> {
>
> //--------------------------------------------------------------------
> --
> // store the group's attributes in attri
>
> //--------------------------------------------------------------------
> --
> Attribute attri = group.openAttribute(k);
> string gAttriName = attri.getName();
>
> if (gAttriName.compare("Attribute Name")==0)
> {
> // Do something
> }
>
>
> }
>
>
>
>
> Jeremy
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org