Hi Yury, Does the type attr_type passed in to the call attr.read(attr_type, &i); match the enum type? Did the program try to find out the attribute's type by calling some functions?
Also, when the crash occurs, could you tell if it's in the C++ API or in the C main library? Would you send me the error you got? Or, if you could do a stack dump, that would be helpful too. Thanks, Binh-Minh ________________________________ From: Hdf-forum <[email protected]> on behalf of Yury Girshovich <[email protected]> Sent: Wednesday, July 24, 2013 2:07 PM To: HDF Users Discussion List Subject: Re: [Hdf-forum] Reading enum bool attribute Hi Binh-Minh, It was not written in our organization. Here is the email from the person who wrote it We read and write the HDF using the python interface which does the conversion to/from hdf internally. Not being a C++ programmer he cannot help more than that. I can ask him for the python script, but I doubt it will help. Thanks a lot, Yury On Wed, Jul 24, 2013 at 1:55 PM, Binh-Minh Ribler <[email protected]<mailto:[email protected]>> wrote: Hi Yury, How did you create and write the attribute? Binh-Minh ________________________________ From: Hdf-forum <[email protected]<mailto:[email protected]>> on behalf of Yury Girshovich <[email protected]<mailto:[email protected]>> Sent: Wednesday, July 24, 2013 1:04 PM To: [email protected]<mailto:[email protected]> Subject: [Hdf-forum] Reading enum bool attribute I am trying to read an attribute defined as typedef enum {bbo=false, bb1=true} bb; as bb i; attr.read(attr_type, &i); The size of the attribute value is 1 byte. For attr_type I tried all kinds of 8 bit predicate types (as one advice suggested use int, and then interpret your data), bur no matter what I do the code crashes. The value is inserted in a different code using Python, so I can get no help from there. How should I define the predicate type then? Thanks _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected]<mailto:[email protected]> http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
