Looks to me like you need a ';' after FILE_NAME's declaration.

On Tue, Nov 19, 2013 at 6:37 AM, Preeti <[email protected]> wrote:

> I am new to using HDF5 data.
> I have just tried to open and close a hdf5 file using the following code-
> --------------------------------------------------
> #include<iostream>
> #include<string>
> #include<cstdlib>
>
> using namespace std;
>
> #include"H5File.h"
> #include"H5Exception.h"
>
> const H5std_string
> FILE_NAME("/usr1/Preeti/HDFdata/3DSND_13NOV2013_0000_L1B_SA1.h5")
>
> int main(){
>         H5File file(FILE_NAME,H5F_ACC_RDONLY);
>         file.close();
>         return 0;
> }
>
> ------------------------------------------------------------------------------------------------------------
>
> but on compiling it gives me following error
>
> [X@Y ~/H5exercise]$ g++ -o readh5 readh5.cpp
> In file included from readh5.cpp:7:
> /usr/local/include/H5File.h:24: error: expected initializer before ‘:’
> token
> readh5.cpp:16: error: expected ‘}’ at end of input
>
> Kindly help me
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
>
> http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
>
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to