Biblithèque HDF5 en C++ creation d'attributs
Bonjour tout le monde,
Y a-t-il quelqu'un qui a déjà travaillé avec la librairie HDF5 (Un format de fichier)?
En fait, j'ai des difficultés à la création d'un attribut de type char. mon code compile, mais à l'excution mon programme crache.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
//L'attribut à sauvegarder
char charAttribut[50];
strcpy(charAttribut,"attribut");
//Le dataType
hid_t charAttType = H5Tcopy (H5T_C_S1);
//Le dataSpace
DataSpace AttSpace(H5T_C_S1);
//Creation de l'attribut
Attribute* att= new Attribute(groupId->createAttribute("ATT",charAttType,AttSpace));
//Ecriture de l'attribut
att->write(charAttType, charAttribut); |
Je vous remercie d'avance.