diff options
Diffstat (limited to 'c++/examples/compound.cpp')
-rw-r--r-- | c++/examples/compound.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp index d3163d6..dfbd544 100644 --- a/c++/examples/compound.cpp +++ b/c++/examples/compound.cpp @@ -45,7 +45,7 @@ int main(void) typedef struct s1_t { int a; float b; - double c; + double c; } s1_t; /* Second structure (subset of s1_t) and dataset*/ @@ -87,21 +87,21 @@ int main(void) H5File* file = new H5File( FILE_NAME, H5F_ACC_TRUNC ); /* - * Create the memory datatype. + * Create the memory datatype. */ CompType mtype1( sizeof(s1_t) ); mtype1.insertMember( MEMBER1, HOFFSET(s1_t, a), PredType::NATIVE_INT); mtype1.insertMember( MEMBER3, HOFFSET(s1_t, c), PredType::NATIVE_DOUBLE); mtype1.insertMember( MEMBER2, HOFFSET(s1_t, b), PredType::NATIVE_FLOAT); - /* + /* * Create the dataset. */ DataSet* dataset; dataset = new DataSet( file->createDataSet( DATASET_NAME, mtype1, space )); /* - * Wtite data to the dataset; + * Wtite data to the dataset; */ dataset->write( s1, mtype1 ); @@ -110,7 +110,7 @@ int main(void) */ delete dataset; delete file; - + // Get the class of the first member in mtype1, then get its type H5T_class_t member1_class = mtype1.getMemberClass( 2 ); if( member1_class == H5T_FLOAT ) @@ -127,7 +127,7 @@ int main(void) file = new H5File( FILE_NAME, H5F_ACC_RDONLY ); dataset = new DataSet (file->openDataSet( DATASET_NAME )); - /* + /* * Create a datatype for s2 */ CompType mtype2( sizeof(s2_t) ); @@ -151,11 +151,11 @@ int main(void) cout << endl; cout << endl << "Field a : " << endl; - for( i = 0; i < LENGTH; i++) + for( i = 0; i < LENGTH; i++) cout << s2[i].a << " "; cout << endl; - /* + /* * Create a datatype for s3. */ CompType mtype3( sizeof(float) ); |