summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2003-10-26 18:54:07 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2003-10-26 18:54:07 (GMT)
commitd8b497ecefc469762b0e77472687880af895ee8c (patch)
treed0de0a2164d42148067045897915dfa9613e9f04 /c++
parent35fe60a23748ef64341e54a8f1f096cedc8ad2fe (diff)
downloadhdf5-d8b497ecefc469762b0e77472687880af895ee8c.zip
hdf5-d8b497ecefc469762b0e77472687880af895ee8c.tar.gz
hdf5-d8b497ecefc469762b0e77472687880af895ee8c.tar.bz2
[svn-r7741] Purpose:
Fix example Description: On Solaris 64 (Sol), the output has garbage for a dataset when fill value is not set. Solution: Added setting fill value to the dataset first. Platforms: Only effected C++ API Linux 2.4 (eirene) SunOS sol 5.8 (sol)
Diffstat (limited to 'c++')
-rw-r--r--c++/examples/extend_ds.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp
index 34a50c3..c4409db 100644
--- a/c++/examples/extend_ds.cpp
+++ b/c++/examples/extend_ds.cpp
@@ -72,10 +72,15 @@ int main (void)
cparms.setChunk( RANK, chunk_dims );
/*
+ * Set fill value for the dataset
+ */
+ int fill_val = 0;
+ cparms.setFillValue( PredType::NATIVE_INT, &fill_val);
+
+ /*
* Create a new dataset within the file using cparms
* creation properties.
*/
-
DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
/*