summaryrefslogtreecommitdiffstats
path: root/c++/examples/extend_ds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/examples/extend_ds.cpp')
-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);
/*