diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp index 19718ac6b8..99f386bb94 100644 --- a/c++/examples/chunks.cpp +++ b/c++/examples/chunks.cpp @@ -17,21 +17,25 @@ * We will read from the file created by extend.C */ -#include - #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; + using std::cout; + using std::endl; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE using namespace H5; -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD #endif const string FILE_NAME( "SDSextendible.h5" ); diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp index 741586a8af..37df231383 100644 --- a/c++/examples/compound.cpp +++ b/c++/examples/compound.cpp @@ -18,21 +18,25 @@ * and read back fields' subsets. */ -#include - #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; + using std::cout; + using std::endl; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE using namespace H5; -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD #endif const string FILE_NAME( "SDScompound.h5" ); diff --git a/c++/examples/create.cpp b/c++/examples/create.cpp index de7dcc63e3..85afc895f0 100644 --- a/c++/examples/create.cpp +++ b/c++/examples/create.cpp @@ -16,13 +16,19 @@ * This example writes a dataset to a new HDF5 file. */ -#include - #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp index a4cd0e1cad..5ec6448c5e 100644 --- a/c++/examples/extend_ds.cpp +++ b/c++/examples/extend_ds.cpp @@ -19,21 +19,25 @@ * */ -#include - #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; + using std::cout; + using std::endl; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE using namespace H5; -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD #endif const string FILE_NAME( "SDSextendible.h5" ); diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp index bb798b2c06..437ba17bcf 100644 --- a/c++/examples/h5group.cpp +++ b/c++/examples/h5group.cpp @@ -20,21 +20,26 @@ * Note that the C++ API iterator function is not completed yet, thus * the C version is used in this example. */ -#include #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; + using std::cout; + using std::endl; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE using namespace H5; -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD #endif const string FILE_NAME( "Group.h5" ); diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp index 776c3229b0..8f00e33645 100644 --- a/c++/examples/readdata.cpp +++ b/c++/examples/readdata.cpp @@ -18,21 +18,25 @@ // information about the dataset in the SDS.h5 file is obtained. // -#include - #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; + using std::cout; + using std::endl; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE using namespace H5; -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD #endif const string FILE_NAME( "SDS.h5" ); diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp index 89cf0b96e9..388939d1c9 100644 --- a/c++/examples/writedata.cpp +++ b/c++/examples/writedata.cpp @@ -21,21 +21,25 @@ * file is closed. Program reopens the file and reads and displays the result. */ -#include - #ifdef OLD_HEADER_FILENAME #include #else #include #endif +#include + +#ifndef H5_NO_NAMESPACE +#ifndef H5_NO_STD + using std::string; + using std::cout; + using std::endl; +#endif // H5_NO_STD +#endif + #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE using namespace H5; -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD #endif const string FILE_NAME( "Select.h5" );